If you extend what you already have,
$line =~ m/StreamTitle='(.*?)(?:'|\z)/i;
or just
$line =~ m/StreamTitle='(.*?)'?/i;
However, if you replace the .*? with the more predictable [^']*, you don't even have to match the end quote:
$line =~ m/StreamTitle='([^']*)/i;
Update: I knew I avoided .*? for a reason. Struck out a bad "solution".
In reply to Re: Including "End of String" in character class?
by ikegami
in thread Including "End of String" in character class?
by doran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |