On 25-May-2010, at 13:40, Ronald J Kimball wrote: > > On Tue, May 25, 2010 at 12:57:53PM -0600, LuKreme wrote: >> OK, trying to sort a file of movie titles. >> >> This is where I got to: >> >> Sort using pattern: >> ^(the|A|An|\d+)?\.?\s+?(.*)$ > > Your regex requires whitespace at the beginning of the actual title,
Doesn't \s+? mean the white space is optional? > ^(?:\d+\.?\s+)?(?:(?:the|a|an)\s+)?(.*)$ Yep, that's exactly what I was trying for, thanks! > Of course, either way you could have trouble with movie titles that > legitimately start with numbers, such as "12 Angry Men". Yep, those few will have to be dealt with manually. -- "Any man who says he can see through women is really missing a lot." - Groucho Marx -- 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.
