Reputation: 23
I'm looking for a regex that I can call from a Linux command line that would replace a PHP function such as:
my_function($one,$two)
with:
my_new_function($one)->command()
I tried:
s/my_function\(\$one,\$two\)/my_new_function\($one\)->command\(\)/g
but that doesn't seem to match it. $two is no longer required.
Upvotes: 2
Views: 105
Reputation: 4288
You don't have to escape parentheses. Try this 's/my_function(\$one,\$two)/my_new_function(\$one)->command()/g'
.
Upvotes: 1