TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
roy roy
NA
27
0
Matching substring using regular expression
May 28 2007 5:00 AM
hello.
Your help is very much appreciated.
I am creating user input validation in a web application,
For that, I want to create regular expression to make sure that a certain substring is NOT contained within the string.
i.e.
word to look for -> "DELETE"
string " xxx DELETE ffff" will FAIL validation(the word DELETE is contained)
string "xxxDELETEfff" wil succeed (the word DELETE is not contained).
* Another question: Is it possible to contactenate this regular expression into an existing one?
i.e.
I have regular expression for checking name field(maximum of 40 charcters), is it possible to add to it the regular expression that checks for substring ?
i.e.
the regular expression will check that the name contains maximum 40 chracters AND that it does NOT contain "DELETE" substring?
" George Bush" -> will pass validation.
" George DELETE Bush" -> will fail.
thank you for your help.
It is very much appreciated.
Roy
Reply
Answers (
1
)
Crystal report
Display problem with zero points