For B:
if ($string =~ m/\A(.*?)Ghz/s) { print "Everyting up to Ghz: $1\n"; }
If you want to inclde the Ghz in the output string, move the closing paren to the end: m/\A(.*?Ghz)/s
Update: Added the + quantifier to the split regex
In reply to Re: Multiple condition split
by moritz
in thread Multiple condition split
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |