Your examples look like C code. If your requirements are very complex, you may need to use a more advanced parser design -- parsing C with just a regex is not possible.if (/func1/) { s/blah/blah/ } elsif (/^#define/) { s/yak/yak/ } else { s/mumble/mumble/ }
In reply to Re: String replace - Part II
by Anonymous Monk
in thread String replace - Part II
by kepler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |