On 2011-09-06, Jefferis Peterson wrote:

Find: ^([A-Z0-9]+) (.*) [0-9]+$
Replace: \1\t\2

But without the delimiters, it processed the page perfectly.
Thanks for my first lesson in depth OBI-WAN :-)

A guess is that the the non-matching lines have some extra whitespace at the start or end of the line. Unless I'm quite sure about it, I don't assume that a line has no extra whitespace, especially at the end. So when using ^ & $ in a pattern, I tend to include an expression for "zero or more whitespace characters", \s*, or "zero or more tabs or spaces", [ \t]*, thus:

Find: ^\s*([A-Z0-9]+) (.*) [0-9]+\*s$
Replace: \1\t\2

An additional note is the dot "." matches any character EXCEPT the newline (\n or \r), unless you tell it otherwise*. If that weren't the case, without the ^ & $ the above pattern would find ONE match: everything from the first id # to the description of the last item in the list.

(*As you move up in levels of regex , you'll encounter pattern modifiers, which do things like allowing "." to match newline characters or making character matches not case-sensitive.)

HTH


   - Bruce

_bruce__van_allen__santa_cruz_ca_

--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to