in reply to Array of strings search
But using [A-z] and the * quantifier is not a very good idea, because it makes a rather weak regex and you may end up capturing things that you don't want.my ($date) = ($VAR1 =~ /([A-z]* [0-9]*.[0-9]*:[0-9]*:[0-9]*)/);
This might already be significantly better:
my ($date) = ($VAR1 =~ /(^\w+ \d+ \d+:\d+:\d+)/);
|
|---|