kirk123 has asked for the wisdom of the Perl Monks concerning the following question:
First I need to verify that the string I am reading in has "\\" follow by either characters or numbers then "\" then either characters or numbers . I try this as:"\\domca-prn01\DH4-2139-HP4"
The problem I am having is getting the string that exist after the single "\" in this situation the string "DH4-2139-HP4". I am thinking backreference maybe the answer. -----thanks thanks in advance.if ( $string =~ /\\\\.*\\.*/) { print"match\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pattern matching problem
by sgifford (Prior) on Jul 22, 2003 at 16:46 UTC | |
|
Re: pattern matching problem
by dga (Hermit) on Jul 22, 2003 at 17:10 UTC | |
|
Re: pattern matching problem
by roju (Friar) on Jul 22, 2003 at 16:48 UTC |