$pre= "\\*\\*"; $post = "%%"; $firstchar = substr($post,0,1); $text = "**this is good%% blah **this is bad%%%%%% blah ***this is bad +%%%blah"; @parts = split(/($pre.*?$firstchar*$post)/,$text); foreach $part (@parts) { print "part: $part\n"; }
In reply to RE: Re: regex question
by joe
in thread regex question
by joe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |