to replace all instances of non-escaped variable names in a source file with the output of whatever(). would there be any way to extend this pattern to NOT match $something[x] (so a scalar name followed by an array subscript, as that actually refers to an array, not a variable)..so basically look at ahead or something and ignore the pattern if its followed by a '['. thx.s/(?<!\\)(\$[a-zA-Z0-9_]+)/whatever()/ge;
Edit: chipmunk 2001-04-26
In reply to problem with substitution regex by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |