in reply to Re: regexp help -- grab almost a whole string
in thread regexp help -- grab almost a whole string

I'm not certain why it must be a "single regexp", but this will do the job in a single line of execution:

if ($if_desc =~ /(DHEC)\.?(\w+)/) {$circuit_id = "$1$2"};

Would this satisfy your requirement?

Blessings,

~Polyglot~

  • Comment on Re^2: regexp help -- grab almost a whole string