Perl Regex Group Name

(?P<NAME>pattern)
(?<NAME>pattern)

  $variable =~ /(?<count>\d+)/;
  print "Count is $+{count}";

 

ref: http://stackoverflow.com/a/288989

Published by

sornram9254

#ElectricalAndElectronic #ComputerTechnique #Ayuttech #ATC #TechnicalEducation #IndustrialEducation #CED #KMUTNB #มจพ #ลูกพระจอม #ลูกพระวิษณุกรรม #พระวิษณุกรรม

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.