in reply to Capturing everything after an optional character in a regex?
perl -le '$string="abcX123"; $string =~ /X([^\s]+)/; print $1;' 123
Update 2003-12-04 12:50:48 CET: See saouq's node in this thread for a solution which fills all of Anonymous Monk's requirements, as mentioned in opqdonut's post below.
--
Allolex
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Capturing everything after an optional character in a regex?
by opqdonut (Acolyte) on Dec 04, 2003 at 11:32 UTC | |
by allolex (Curate) on Dec 04, 2003 at 11:45 UTC | |
by sauoq (Abbot) on Dec 04, 2003 at 21:04 UTC |