phemal has asked for the wisdom of the Perl Monks concerning the following question:
suppose the string is
now i want to do a pattern match formy $x = "set manager logport [<0-10000>] set manager secondary ip A.B.C.D set mgmtport auto set mgmtport speed (10|100) duplex (full|half) set portsettletime <0-300> set sensor gateway A.B.C.D set sensor ip A.B.C.D E.F.G.H";
if i do the above this thing is not workingmy $y = set mgmtport speed (10|100) duplex (full|half) if ($x=~ /$y\s+/ig) { }
2006-09-18 Retitled by holli, as per Monastery guidelines
Original title: 'pattern matching'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How Do I Skip Spaces At The End of Words Using A Regex?
by davido (Cardinal) on Sep 18, 2006 at 04:20 UTC | |
|
Re: How Do I Skip Spaces At The End of Words Using A Regex?
by Zaxo (Archbishop) on Sep 18, 2006 at 04:47 UTC | |
|
Re: How Do I Skip Spaces At The End of Words Using A Regex?
by ikegami (Patriarch) on Sep 18, 2006 at 04:57 UTC | |
by jwkrahn (Abbot) on Sep 18, 2006 at 08:36 UTC | |
by Not_a_Number (Prior) on Sep 18, 2006 at 08:27 UTC | |
|
Re: How Do I Skip Spaces At The End of Words Using A Regex?
by rsriram (Hermit) on Sep 18, 2006 at 05:10 UTC |