I'm running through some logs of search queries, trying to pull out the ones containing variations on United Nations. I am trying to write a regular expression that can match a two letter format (such as "UN", "U.N." or "U. N.") or a two word format ("United Nations", "united +nation").
So far my flailing attempts have been able to match all of the above, but they are also yielding any other word beginning with "un".
I want to match these:
un u.n. u. n. united nation united +nation
....but not these:
united states UNDP unsuccessful
Any help would be much appreciated. The log files are rather large so if possible I'd prefer a solution that works in one pass.
Thanks, Marcy
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "support@barebones.com" rather than posting to the group. -~----------~----~----~----~------~----~------~--~-
May 26
Ronald J Kimball Re: subpatterns in grep (maybe)
May 26, 2009; 12:06
Ronald J Kimball
Re: subpatterns in grep (maybe)
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!