ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rich" <>
Subject RE: Need help writing regular expression??
Date Wed, 22 Jun 2005 21:12:31 GMT
<propertyregex property="userID"
              casesensitive="false" />

You may have to play around with it to make sure the whitespaces are in the
right places, especially the end of the line. I assumed that a name was on a
single line terminated by whitespace. You are also assuming that a person
can have only two parts to their name. If the last name can have Jr., III,
or something like that following it this reg exp will truncate the name. So,
Fred Flintstone II will be FFlintstone and you will loose that fact that he
has a different name than his father, Fred Flintstone.

HTH Bill
-----Original Message-----
From: Ninju Bohra [] 
Sent: Wednesday, June 22, 2005 1:55 PM
To: Ant Users Group
Subject: Need help writing regular expression??

Hello all,

Quick question... I need write a regular expression to generate
<FirstLetterOfFirstName><LastName> from a full name (i.e. <First Name> <Last

Given the string:  Ninju Bohra

I want:  NBohra

What is the regular expression (if any) I would use?

<property name="" value="Ninju Bohra"/>

<propertyregex property="userID"
              regexp="<need help here>"
              casesensitive="false" />


Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football

To unsubscribe, e-mail: For additional
commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message