in reply to why does this match still?
The pattern (\S+) means "capture one ore more non-whitespace chars", so that captures H<2:0>,I<3:0>,<*2>P - you might want e.g.
if ($string =~ /^<\*(\d+)>([,\w]+)<(\d+):(\d+):(\d+)>$/) { print "Matched\n"; }
But without more context, it's not possible to determine the most suitable regexp.
|
|---|