gnu-regexp-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-regexp-discuss] Urgent Help Needed on Regular Expression gnu-regexp


From: Prashant S. Sarode
Subject: [Gnu-regexp-discuss] Urgent Help Needed on Regular Expression gnu-regexp-1.0.8.jar
Date: Thu, 31 Mar 2005 16:50:51 -0800 (PST)

Hi,
    Can anyone provide me the regular _expression_ for the following?
1. String Should contain 7 letters (can include '*') followed by 5 alphanumeric characters i.e.5 numbers/letters
     For this one, I've written reg expn = ([a-zA-Z]*[*]*[a-zA-Z]*){7}\\w{5}
 But, somehow this is not working...can anyone pleaseeeee explain wots wrong with this one or give me alternate solution???????
 
2. String should contain 7 numbers or 7 digits consisting of 1 letter & 6 numbers in varying order, no spaces.
For this one,  reg expn = (\\d{7})|((\\d*[a-zA-Z]\\d*){7})
But this is also not working...... Please help!!!!!
 
3. String should contain 9 numbers or 8 alphanumeric characters i.e. 8 numbers/letters or 13 numbers
    This one looks really simple, but still (\\d{9})|(\\w{8})|(\\d{13}) is not working.....Please helpppp
 
    I'll appreciate if any Regular Expresion expert can resolve my problem!!! Also, I'm using gnu-regexp-1.0.8.jar as we r not using JDK 1.4!!!! We've to use only this library, no other choice...so, please suggest!!!!!!
 
Thanks!


Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]