Hello,

I'm using the following line in Terminal, on OSX Lion, but I can't seem to
match parentheses '()':

perl -n -e 'print if(/\\(Submit\\)/)' visits/admin_add.ctp

I tried with one backslash in front of each '(' ')' as well to no avail.
 If I remove the '\'s and '()' the match is printed like so:

<?php echo $form->end('Submit');?>

My purpose is to make sure I'm matching the correct lines including the
'()', then to alter the code to perform a search and replace on the
matches).   Something like:

perl -p -i.bak -e 's/PATTERN/REPLACE/g' INPUT

Thanks!

Jon

Reply via email to