Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Need help writing regular expression??

Need help writing regular expression??

2005-06-22       - By Ninju Bohra
Reply:     1     2     3     4     5  

Worked like a charm, thanx.

--- "Hardacker, Andrew"
<Andrew.Hardacker@(protected)> wrote:

> Untested, but probably something like this:
>
> <propertyregex property="userID"
>               input="${full.name}"
>               regexp="(.).*\s(.*)"
>               replace="\1\2"
>               casesensitive="false"/>
>
> Andy Hardacker
>
> -----Original Message-----
> From: Ninju Bohra [mailto:ninju_bohra@(protected)]
> Sent: Wednesday, June 22, 2005 4: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 Name>)
>
> Given the string:  Ninju Bohra
>
> I want:  NBohra
>
> What is the regular expression (if any) I would use?
>
> <property name="full.name" value="Ninju Bohra"/>
>
> <propertyregex property="userID"
>               input="${full.name}"
>               regexp="<need help here>"
>               select="\1"
>               casesensitive="false" />
>    
> Thanx,
>
> Ninju
>
>
>
>
>
>    
> ____________________________________________________
>
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
>
> http://football.fantasysports.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)
>
>
>
> The contents of this e-mail are intended for the
> named addressee only. It
> contains information that may be confidential.
> Unless you are the named
> addressee or an authorized designee, you may not
> copy or use it, or disclose
> it to anyone else. If you received it in error
> please notify us immediately
> and then destroy it.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)
>
>





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.