When there is an easier way
Most languages provide a simple function like INSTR to determine if one string is a subset of another. If that's what you want to do, use the simpler function. Don't write your own regular expression.
If there is a library available for performing a complex string manipulation, use it rather than writing your own regular expression.
When regular expressions are not sufficiently powerful
If you need a parser, use a parser.
- If you need a parser, use a parser.