doran has asked for the wisdom of the Perl Monks concerning the following question:
$line =~ m/StreamTitle='(.*?)';/i;
This is fine if the line is something like this:
{<F-#f]?o!StreamTitle='Five Keys - Girl You Better Stop It';wFU1*
For reasons I'm not sure of, sometimes the line is truncated and doesn't have the closing ';, so I need regex which says grab everything after StreamTitle=' up until '; or the end of line, whichever comes first. It's as if I need to include the end of string in a character class, but doing something like [;\Z] doesn't work. I'm sure there must be a way, but don't know how.
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Including "End of String" in character class?
by Fletch (Bishop) on Mar 16, 2007 at 19:05 UTC | |
by doran (Deacon) on Mar 16, 2007 at 19:14 UTC | |
|
Re: Including "End of String" in character class?
by ikegami (Patriarch) on Mar 16, 2007 at 19:16 UTC | |
by doran (Deacon) on Mar 16, 2007 at 19:31 UTC | |
|
Re: Including "End of String" in character class?
by japhy (Canon) on Mar 17, 2007 at 02:11 UTC | |
|
Re: Including "End of String" in character class?
by shigetsu (Hermit) on Mar 16, 2007 at 19:19 UTC | |
by doran (Deacon) on Mar 16, 2007 at 19:26 UTC |