|Perl Monk, Perl Meditation|
|( #3333=superdoc: print w/replies, xml )||Need Help??|
Note that if your string does not contain 'whatever', then HyperZonk's second regex will return nothing.
I'm going to go out on a limb here, as regexes are not my thing, but this might just work:
$string =~ /^((.*?)(whatever))*(.*)$/;
However to be perfectly honest, I've no idea which $1, $2, $3, etc will be the values you want, or even if the regex is correctc.
I seem to have bitten off a bit much. Can somebody help?
In reply to (elbie): "everything but" regex