Re: How To Match: $CONF['setup_password'] =

"n22e113 [email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
>> Q. How to match the following PHP5 expression?
>> 
>> $CONF['setup_password'] = 'changeme';
> 
> The same regular expression should work for both:
> 
> bash$ cat > config.php
> echo "Hello!"
> $CONF['setup_password'] = 'changeme';
> $CONF['something_else'] = 42
> ^D
> bash$ grep "^\$CONF\['setup_password']" config.php
> $CONF['setup_password'] = 'changeme';
> bash$ sed "/^\$CONF\['setup_password']/s/changeme/newpassword/" config.php
> echo "Hello!"
> $CONF['setup_password'] = 'newpassword';
> $CONF['something_else'] = 42
> bash$

Thank you! Almost got it! But I had used the ''' instead the '"' character just after the command sed. :(
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.