On 27 February 2019 at 17:25 Assad Kety wrote and made these points AK> I'm using the following template to clean subject line. It works well AK> until a subject starts with a square bracket. For example, if a subject AK> looks something like this '[Re: Hello]', the template does not AK> work. I receive a lot of messages which start with square bracket in AK> my work. Thanks in advance.
AK> %SETHEADER("Subject","Re: %- AK> %SetPattRegExp='(?i)\A\:?(\s*(vs|sv|re|I|R|aw|ha|rcpt|fw|fwd|forw|odp|pd|tr|wg|tr)%- AK> (\[\d{1,3}\])?:\s*|\[.*?\])*\s*(.*?)\Z'%- AK> %RegExpBlindMatch='%OSubject'%SubPatt='4'")%- Here's the one I use: %_______%REM="clean subject - by daniel hahler"%________%- %_oldSubj=%OSubj%- %Subject="%- %SetPattRegExp='(?ix)\A:? ( [([]+ .*? [)\]]+ )*\s* # save topic/listname (?: (?: (?:aw|antw|antwort|betrifft|fw|fwd|forw| forward|ha|rcpt|re\^?\d*|sv|vs|wg|wtr)(?:\[\d*\])?[:\s]+ ) |[\s:]+ )* (.*?) # the subject \s* ( ([(\[]+ ( (wa[rs][:; ] | pgp | s/mime ).* | fwd ) [)\]]*\s* )* )\z'%- %RegExpBlindMatch='%OSubj'%- %- Re: %SubPatt='2'"%- %___________________________________%- -- Cheers -- Marck D Pearlstone -- List moderator and fellow end user TB! v8.8.0.2 (BETA) on Windows 10.0.17763
pgptA_ycYoOXZ.pgp
Description: PGP signature
________________________________________________________ Current beta is 8.7.0.14 | 'Using TBBETA' information: http://www.silverstones.com/thebat/TBUDLInfo.html