Reputation: 23
I apologize if it sounds dumb to you, but I need to find __( 'anyTextHere', 'foo' )
and replace all of the instances with 'anyTextHere'
.
Basically, I just want to retain 'anyTextHere'
, then delete the rest.
Sample code:
__( 'beach', 'foo' )
__( 'summer', 'foo' )
then find:
__( 'anyTextHere', 'foo' )
and when replaced with regular expressions, the result should be:
'beach'
'summer'
Thank you very much for your help!
Upvotes: 2
Views: 229
Reputation: 92986
Search for
__\( '([^']*)', 'foo' \)
and replace with $1
To be more general:
__\( '([^']*)', '[^']*' \)
and replace also with $1
Upvotes: 2