How would I create a function to convert part of a string to uppercase or lowercase ?
An example is as follows:
blah blah blah §DimIx§( sDimension, sElement, §DimNm§( sDimension, sElement ) );
- All parts WITHIN the § characters should be uppercase or lowercase.
- The § characters mark functions (each pair of § is a function)
- The § characters need to be removed to
- The § can be changed if needed, it's just a character that is unique
End result:
blah blah blah dimix( sDimension, sElement, dimnm( sDimension, sElement ) );
or:
blah blah blah DIMIX( sDimension, sElement, DIMNM( sDimension, sElement ) );
So I started:
Code: Select all
Change_Case( String, Case_type )
{
}
I am not good at regular expressions so can someone help me please ?
Thanks a lot !