Re: find and replace with regular expressions

2008-08-01 Thread dusans
On Aug 1, 12:53 pm, dusans <[EMAIL PROTECTED]> wrote: > On Jul 31, 10:07 pm, [EMAIL PROTECTED] wrote: > > > > > > > I am using regular expressions to search a string (always full > > sentences, maybe more than one sentence) for common abbreviations and > > remove the periods.  I need to break the s

Re: find and replace with regular expressions

2008-08-01 Thread dusans
On Jul 31, 10:07 pm, [EMAIL PROTECTED] wrote: > I am using regular expressions to search a string (always full > sentences, maybe more than one sentence) for common abbreviations and > remove the periods.  I need to break the string into different > sentences but split('.') doesn't solve the whole

Re: find and replace with regular expressions

2008-07-31 Thread MRAB
On Jul 31, 9:07 pm, [EMAIL PROTECTED] wrote: > I am using regular expressions to search a string (always full > sentences, maybe more than one sentence) for common abbreviations and > remove the periods.  I need to break the string into different > sentences but split('.') doesn't solve the whole p

Re: find and replace with regular expressions

2008-07-31 Thread Paul McGuire
On Jul 31, 3:07 pm, [EMAIL PROTECTED] wrote: > > middle_abbr = re.compile('[A-Za-z0-9]\.[A-Za-z0-9]\.') > When defining re's with string literals, it is good practice to use the raw string literal format (precede with an 'r'): middle_abbr = re.compile(r'[A-Za-z0-9]\.[A-Za-z0-9]\.') What abbre

Re: find and replace with regular expressions

2008-07-31 Thread Mensanator
On Jul 31, 3:56 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Jul 31, 3:07 pm, [EMAIL PROTECTED] wrote: > > > > > > > I am using regular expressions to search a string (always full > > sentences, maybe more than one sentence) for common abbreviations and > > remove the periods.  I need to break th

Re: find and replace with regular expressions

2008-07-31 Thread Mensanator
On Jul 31, 3:07 pm, [EMAIL PROTECTED] wrote: > I am using regular expressions to search a string (always full > sentences, maybe more than one sentence) for common abbreviations and > remove the periods.  I need to break the string into different > sentences but split('.') doesn't solve the whole p

find and replace with regular expressions

2008-07-31 Thread chrispoliquin
I am using regular expressions to search a string (always full sentences, maybe more than one sentence) for common abbreviations and remove the periods. I need to break the string into different sentences but split('.') doesn't solve the whole problem because of possible periods in the middle of a