in reply to Second Time Replace Regex
Well, that's charmingly abstract. Some questions:
- Can X contain P? Or, rather, how can you be sure you've found the right P?
- Do either APB or CXP appear multiple times? I.e. APB APB CXP CXP? If so, how should they be treated?
- Do A?B and C?P appear multiple times with different values? E.g. APB CXP ASB CXS? How should they be treated?
- Can you give some real examples of APB and CXP?
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.