It's always better to write (\S*)\s than (.*?)\s, because you're making it clear to the matching engine exactly what you're looking for (non-space characters in this case).'Better' => sub { $line =~ /(chr\S*).*?urn:lsid:(\S*).*?panel:([^:]*)/i }
In reply to Re^3: Regex, capturing variables vs. speed
by robin
in thread Regex, capturing variables vs. speed
by albert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |