Thanks...

Needed to ^([[:alpha:]]*)([[:digit:]]+) to \1,\2 

I'm pasting this into an excel column to split the column in half.

I decided comma was a better delimiter. The + after alpha didn't accommodate 
the cases where there weren't any alphas.

Kim
On Jun 18, 2012, at 8:28 AM, Alex Satrapa wrote:

> The long version:
> Get Jeffrey E.F. Friedl, "Mastering Regular Expressions" 
> http://shop.oreilly.com/product/9780596528126.do
> 
> The short version:
> do you want a space before the "5" by itself, or do you only want to put a 
> space between the last of a group of letters and the first subsequent digit?
> 
> The following will insert a space only where there is a letter followed by a 
> digit.
> 
> In Find/Replace:
> 
> Find: ^([[:alpha:]]+)([[:digit:]]+)
> 
> Replace: \1 \2
> 
> … and make sure to tick the "grep" box.
> 
> That regular expression anchors the expression to the beginning of a line. 
> The first parenthesised expression says "match one or more letters, taking 
> locale into account for things like ü, ø and ß", the second parenthesised 
> expression says "match one or more numbers". The replacement says, "put the 
> first match here, then a space, then put the second match here."
> 
> Stuff that wasn't matched will not be touched, so the 5 by itself will be 
> left alone, while "BD418.3" will have the "BD418" component replaced with "BD 
> 418" resulting in "BD 418.3".
> 
> If you're going to be doing more stuff with regular expressions (i.e.: grep), 
> you really should get that book!
> 
> Alex
> 
> On 17 Jun 2012, at 11:48, Kim Mosley wrote:
> 
>> I wish to create a space between the letters and numbers in the below list. 
>> What grep pattern can I use?
>> 
>> Thanks so much!
>> 
>> 5
>> B105
>> B105
>> B121
>> B1238.52
>> B132
>> B132
>> B162
>> B1624
>> B5134
>> B5242
>> B5242
>> B72
>> B945
>> BD418.3
>> 
>> -- 
>> 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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> 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 "[email protected]" rather than posting to the group.
>> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> 
> -- 
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to