Hi Gerd,

Historians believe that Fri, 2 Feb 2001 at 15:30 GMT +0100 was when,
Gerd Ewald [GE] typed the following:

GE> Hello solid_snake !


GE> On Fri, 2 Feb 2001 12:18:08 +0700 GMT your local time,
GE> which was 02.02.2001, 06:18 (GMT+0100) where I live, you wrote:

GE> [...]

>> How, I can change the name of someone (source is %OFromName), to be 5
>> ,6 or 7 long character. Like the example upthere..
>> From Front/ not from Back the name is,

>> Oh yeah, I almost forgot. It should be add chars "..." after 5,6,7
>> characters then.


GE> Try that one
GE> <regex>
GE> 
%SETPATTREGEXP="(?i)(^\w{1,5}).*?(@)(.*)"%REGEXPBLINDMATCH="%OFROMADDR"%Subpatt="1"...
GE> </regex>

GE> It might be optimized by the regex-experts; but it does work here. The number of
GE> characters you want to have can be adjusted in the {1,5}-part. 5 is the
GE> number of returned characters.

GE> Perhaps someone with more experience has a look on it to find out where
GE> this regex might crash; I'm still a novice in regex.

It will crash only if someone has special characters in their name
(accented letters, etc.).  You can avoid that problem by replacing
"\w" with a square bracket containing everything you *don't* want.  Or
I would personally be more general and use: "\S"  So I would
include everything that is not whitespace (I think the syntax is
right).

-- 
Thanks for writing,
 Januk Aggarwal

 Using The Bat! 1.49c under Windows 98 4.10 Build 2222  A

 Personal Plan:  To avoid sanity, lucidity and wit at all costs.

-- 
______________________________________________________
Archives   : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

Reply via email to