Re: Regex help needed
Good evening Marck, It was foretold that on 24-3-2003 @ 18:29:15 GMT+ (which was 19:29:15 where I live) Marck D Pearlstone would mumble: MDP> Maybe a couple of QTs can help you to do this: Haven't tested it yet Marck but TIA. -- Best regards, Luc --- Powered by The Bat! version 1.63 Beta/7 with Windows 2000 (build 2195), version 5.0 Service Pack 3 and using the best browser: Opera. "Anger is a wind which blows out the lamp of the mind." - Robert G. Ingersoll. Current version is 1.61 | "Using TBTECH" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Regex help needed
Hello Luc, On March 24, 2003, at 9:28 AM, you [L] wrote (at least in part): L> Maybe a regex that has some kind of condition: L> if A B = [EMAIL PROTECTED], use A, otherwise use B ... or something like L> this: I use the following, which has worked brilliantly for me. It was discussed quite a while in one of these groups. It does a very good job of figuring out who the To is and if multiple people uses All. Main QT titled "To" start %if:'%SETPATTREGEXP="([EMAIL PROTECTED](,|;{1})[EMAIL PROTECTED])"%REGEXPMATCH="%ToList"'<>'':'All':'%ABtoFIRSTNAME="%TOFNAME"'%- end Various QT's based on formality. For example, following is QT To-Business which goes in my business address book group templates. start- Dear %CAPITAL="%QINCLUDE='To'": end--- -- Best regards, John Thomas Current version is 1.61 | "Using TBTECH" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Regex help needed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Luc, @24-Mar-2003, 18:28 +0100 (17:28 UK time) Luc [L] in mid:[EMAIL PROTECTED] said: L> Maybe a regex that has some kind of condition: L> if A B = [EMAIL PROTECTED], use A, otherwise use B ... or something L> like this: i'm a blundering idiot when it comes to these things L> i'm afraid lol. Maybe a couple of QTs can help you to do this: ,-=[ FNatom ]=-< %SETPATTREGEXP='(.*?)\.(.*?)@'%REGEXPMATCH='%OFROMADDR'%- %SUBPATT='1'%- `| ,-=[ SNatom ]=-< %SETPATTREGEXP='(.*?)\.(.*?)@'%REGEXPMATCH='%OFROMADDR'%- %SUBPATT='2'%- `| Then use this IF combo to implement the logic (you can hide this in a QT too. %IF:'%QINCLUDE=+FNatom+'='%TOFNAME':'%TOFNAME':'%- %IF:"%QINCLUDE=+SNatom+"="%TOFNAME":"%TOLNAME":"%TOFNAME"'%- This is untested. - -- Cheers -- .\\arck D Pearlstone -- List moderator TB! v1.63 Beta/7 on Windows 2000 5.0.2195 Service Pack 2 ' -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1rc1-nr1 (Windows 2000) iD8DBQE+f058OeQkq5KdzaARArTlAJ996+aIZKSVYQNWJfDLWWzBwRf2ZwCeMVf4 vPKI7O+tYF3L+CnFBxb6zZY= =2c94 -END PGP SIGNATURE- Current version is 1.61 | "Using TBTECH" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Regex help needed
Good evening Dierk, It was foretold that on 24-3-2003 @ 19:13:28 GMT+0100 (which was 19:13:28 where I live) Dierk Haasis would mumble: DH> I doubt it. See below. There goes my solution lol. Anyway, tnx for the reply. -- Best regards, Luc --- Powered by The Bat! version 1.63 Beta/7 with Windows 2000 (build 2195), version 5.0 Service Pack 3 and using the best browser: Opera. "To many, no doubt, he will seem blatant and bumptious, but we prefer to regard him as being simply British." - Oscar Wilde (1854-1900) - Irish novelist, playwright and wit Current version is 1.61 | "Using TBTECH" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Regex help needed
Hello Luc! On Monday, March 24, 2003 at 6:28:33 PM you wrote: > Is there a work around and still using the first name of the > recipient? I doubt it. See below. > Maybe a regex that has some kind of condition: > if A B = [EMAIL PROTECTED], use A, otherwise use B The problem lies in knowing what counts as a surname and what as a first name. It is (relatively) easy for humans to recognize which is which - as long as the underlying rule is known. For most (all?) indo-european languages the pattern is (as indicated by the terms "First ... Last name" or "Vorname ... Nachname" in English and German respectively) is: "Given Name" first then "Family Name" But that is *not* universal. In Asian languages it goes the other way round, some languages don't even have given names. What we do is recognize the correct name from context and lexical knowledge ("Joe" is usually a first name, "Smith" isn't). Sometimes even this doesn't work: Götz Friedrich is a perfectly normal name in Germany, as is Friedrich Götz. You can't tell which is which. If someone really provides a macro or RegEx, in fact any kind of algorithm, making the required decision at least 95% correct, he will be a rich man. I venture to say that you can't bring up even a complicated RegEx with lexical look-up which will be correct considerably more than 50% (which would be random as long as the number of instances of reversed order names is as high as the correct order *and* we are talking addresses without middle name/initial). -- Dierk Haasis The Bat 1.63 Beta/7 on Windows XP 5.1 2600Service Pack 1 My suspicion is that the universe is not only queerer than we suppose, but queerer than we *can* suppose. (J.B.S. Haldane) Current version is 1.61 | "Using TBTECH" information: http://www.silverstones.com/thebat/TBUDLInfo.html
Regex help needed
Good evening list, I have in my reply template the following macro: %TOFNAME. This works great until i receive a message from somebody who has his address like this: Doe John <[EMAIL PROTECTED]>. In this case i get of course when i reply 'Goodmorning Doe, bla bla bla '. Is there a work around and still using the first name of the recipient? I'm not looking for 'Goodmorning %ABOFROMFIRSTNAME="%TOFNAME" '(solution offered by Marck Pearlstone) because that will only help me if it's from people i have in my AB. Maybe a regex that has some kind of condition: if A B = [EMAIL PROTECTED], use A, otherwise use B ... or something like this: i'm a blundering idiot when it comes to these things i'm afraid lol. -- Best regards, Luc Powered by The Bat! version 1.63 Beta/7 with Windows 2000 (build 2195), version 5.0 Service Pack 3 and using the best browser: Opera. "I told my wife that a husband is like a fine wine; he gets better with age. The next day she locked me in the cellar." Current version is 1.61 | "Using TBTECH" information: http://www.silverstones.com/thebat/TBUDLInfo.html