I don't use regular expressions much in any code as I don't normally have any need for them.
However transforming code regular expressions come in handy.
The trick is remembering how to use regular expressions or to create a crib sheet
This one uses 'capture groups'.
Find:
(SID.*):
Replace With:
$1: return "$1";
Converts the following:
However transforming code regular expressions come in handy.
The trick is remembering how to use regular expressions or to create a crib sheet
This one uses 'capture groups'.
Find:
(SID.*):
Replace With:
$1: return "$1";
Converts the following:
case SID_AAAA: case SID_BBBBB: case SID_CCCCCC:
into:
case SID_AAAA: return "SID_AAAA"; case SID_BBBBB: return "SID_BBBBB"; case SID_CCCCCC: return "SID_CCCCCC";
Comments
Post a Comment