1
I’m starting with regex now so I’m not very good yet with expressions, assuming I have the following variable:
$foo = "
#01 = linha comentada;
02 = valor para ser interpretado;
#03 = outra linha comentada;
";
How to create a regex to remove lines 01 and 03 leaving only line 02 to be interpreted in the future?
Note: Each line ends on ;
Thanks for posting the regex explained, the same works with JS?
– Leo Letto
@Leoletto is basically the same, uses the flag
g
: https://jsfiddle.net/yq0vvwcj/– Sergio