![]() |
|
No such thing as a small change | |
PerlMonks |
Re^4: regex optional word matchby Rahul Gupta (Sexton) |
on Jul 26, 2012 at 10:54 UTC ( #983825=note: print w/replies, xml ) | Need Help?? |
hi,
I have one array with 2 Strings: In "String1" I have two extra values that is "6.056 ms" and "0/ 233 (0%)" rest are same in both string; I tried this regex: m/^REMOTE\s+\[(.*?)\]\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+\[(.*?)\]\s+(.*?)sec\s+(.*)MBytes\s+(.*)Mbits\/sec but need to add the above mentioned two values of String1 in regex and make them optional so that both condition gets passed and last values stored in $10, $11. Can anyone help me? Thanks in advance
In Section
Seekers of Perl Wisdom
|
|