Like this?
$s = 'fred_bill_john_jack_joe_mary_eugene';; $s =~ /(^[^_]+_[^_]+_[^_]+_)/ and print "'$1'";; 'fred_bill_john_'
Or this?
$s =~ /(^(?:[^_]+_){3})/ and print "'$1'";; 'fred_bill_john_'
In reply to Re: Quick regex
by BrowserUk
in thread Quick regex
by Karger78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |