Hello Urke, Historians believe that Sun, 6 May 2001 at 00:14 GMT +0200 was when, Urke [U] typed the following: U> Do have some way to change format of name of day by regex, and also U> name of month, when making reply or forward? You mean reformat the output from the %DATE command? I'll assume yes. If I'm wrong, change all instances of %DATE to whatever macro you're using. U> Example: U> Original format by system default: U Subota, 05. maj 2001. U> User-defined format by regex: U Subotu, 05. maja 2001. U> ^| ^| U> this is characters that regex must +---------+ U> to replace and insert. U> List of system default and user defined names: Your example suggests that you'd be best to make a bunch of quick-templates. You'll use these to do the translation. All the QT's for the days should be named: "Day-Sreda", "Day-Subota", "Day-Nedelja" The QT contains only the replacement word(s). Do the same for the month, but instead of the "Day-" prefix, use "Month-". (Of course you can change these prefixes, just be consistant.) Now make a "Date" QT with the following: --- Begin Template --- %REM="First get the U"%- %SETPATTREGEXP="^(.*?\s)\s*\w*\,\s\d+\.\s\w*\s.*$"%REGEXPMATCH="%DATE"%- %- %REM="Now translate the day"%- %QINCLUDE='Day-%SETPATTREGEXP="^.*?\s+(\w*)\,\s\d+\.\s\w*\s.*$"%REGEXPMATCH="%DATE"',%- %- %REM="Need to get the day number" %SETPATTREGEXP="^.*?\s+\w*\,\s*(\s\d+\.\s)\s*\w*\s.*$"%- %REGEXPMATCH="%DATE"%- %- %REM="Translate the month"%- %QINCLUDE='Month-%SETPATTREGEXP="^.*?\s+\w*\,\s\d+\.\s(\w*)\s.*$"%REGEXPMATCH="%DATE"%- %- %REM="Get the year"%- %SETPATTREGEXP="^.*?\s+\w*\,\s\d+\.\s\w*\s*?(\s.*)$"%- %REGEXPMATCH="%DATE"%- %- %REM="End"%- --- End Template --- By the way, this template made liberal use of some macros that are new to version 1.52. If you are using 1.51 or older, remove the %REM="*" and %- macros. Note I don't have the proper format date to test the above regexps. Please let me know if it worked according to plan. -- Thanks for writing, Januk Aggarwal Using The Bat! 1.52 under Windows 98 4.10 Build 2222 A All science is either physics or stamp collecting. -- E. Rutherford -- ______________________________________________________ Archives : <http://tbtech.thebat.dutaint.com> Moderators : <mailto:[EMAIL PROTECTED]> Unsubscribe: <mailto:[EMAIL PROTECTED]> You are subscribed as : [email protected]
