in reply to Regexpresions
This will match a 'n' followed by a '\' followed by 0 or 1 instance of any char followed by a '\'.$var =~ /n\\(.?)\\/
$1 in the first $var will become '{some text}' with the first regex and '{some text}\{some more text}' with the second.$var='{some text} n\{some text}\{some more text}\'; and $var='{some text} n\{some text}\{some more text}'; #Your old version
|
|---|