regex email address and apostrophe problem

A swapping-ground for Regular Expression syntax

regex email address and apostrophe problem

Postby bobp123 » Mon Oct 22, 2012 4:42 pm

I want to strip off the last integer after the dot and before .msg

Match: (.*)\.(\d*)
Replace: \1

SSS [sombody@gmail.com] RE- FW- Meeting 05-12-2008 6.48.2032795.msg

Correctly converts to

SSS [sombody@gmail.com] RE- FW- Meeting 05-12-2008 6.48.msg

However the following fails

John Doe [John@johndoe.com] BigCompany ‘Xtest 14-01-2011 17.18.1951344.msg

Creating just ".msg"

I've tried ([.\‘]*) and this causes an error.

Any help is much appreciated.
Bob
bobp123
 
Posts: 1
Joined: Mon Oct 22, 2012 4:06 pm

Re: regex email address and apostrophe problem

Postby Stefan » Tue Oct 23, 2012 6:04 am

What's about just

Remove Last 8 signs ?




.
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to Regular Expressions