On Tue, Oct 11, 2011 at 12:00 PM, Steve Fink <span dir="ltr"><<a href="mailto:sphink@gmail.com">sphink@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
...<br>
Option 2:<br>
<br>
my ($sentence) = /^(?:\s*\d+\.\s*)?(.*)/;<br>
<br>
or if you want to strip whitespace from the beginning of non-numbered<br>
lines as well:<br>
<br>
my ($sentence) = /^\s*(?:\d+\.\s*)?(.*)/;<br></blockquote><div><br></div><div>+1 for this solution, as it doesn't assume numbers/spaces at the beginning of each line; the OP's post made it sound like their presence wasn't guaranteed. </div>
</div>