I need a regex, a regex is what I need
Well I need a regex, a regex is is what I need
And I said I need regex, regex; a regex is what I need
And if I share with you my story would you share your regex with me
-- Aloe Blacc - I need a dollar
Like said above, it sounds like you want the /s modifier.
use strict; use warnings; my $foo = "blabla foo \n yadayada \n bar bla bla"; print "\n<--\n$foo\n-->\n"; $foo =~ s/foo.+bar//s; print "\n<--\n$foo\n-->\n"; __END__ Output: <-- blabla foo yadayada bar bla bla --> <-- blabla bla bla -->
In reply to Re: need a regex
by muba
in thread need a regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |