Re: Regex to clean up subject
On Wednesday, September 2, 2015, 6:28:01 PM, you (tbudl@thebat.dutaint.com) wrote: > %SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%- > \s*(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)*%- > (.*?)%- > ([\(\[].+[\)\]])?$/%- > %RegExpBlindMatch="%OSubj"%- > %Subject='Re: %SUBPATT="1"%SUBPATT="2"' It would be very helpful if someone could explain what is going on here. Thanks. -- Leonard S. Berkowitz Using The Bat! v5.2.2 on Windows 7 6.1 Build 7601 Service Pack 1 Current version is 6.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Regex to clean up subject
Thanks!! -- Rick > On Monday, August 31, 2015, 5:04:44, Rick Grunwald wrote: >> Someone once gave me an excellent regular expression that would clean >> up the subject of things like [this] and {that} >> I lost it along with all my mail in a hard drive crash >> If someone has it, could you kindly repost it? > Here's the one I use: > %SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%- > \s*(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)*%- > (.*?)%- > ([\(\[].+[\)\]])?$/%- > %RegExpBlindMatch="%OSubj"%- > %Subject='Re: %SUBPATT="1"%SUBPATT="2"' The Bat !: Version 7.0.2.1 (BETA) (64-bit) Windows:Windows major version number 3 Current version is 6.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Regex to clean up subject
On Monday, August 31, 2015, 5:04:44, Rick Grunwald wrote: > Someone once gave me an excellent regular expression that would clean > up the subject of things like [this] and {that} > I lost it along with all my mail in a hard drive crash > If someone has it, could you kindly repost it? Here's the one I use: %SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%- \s*(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)*%- (.*?)%- ([\(\[].+[\)\]])?$/%- %RegExpBlindMatch="%OSubj"%- %Subject='Re: %SUBPATT="1"%SUBPATT="2"' -- < Jernej Simončič ><><><><>< http://eternallybored.org/ > Life is what happens to you while you are making other plans. -- Knight's Law Current version is 6.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html