Re: Regular Expression
- From: "Rahul" <ravi.sgn@xxxxxxxxx>
- Date: 9 Nov 2006 02:21:49 -0800
Dear John
Thanks for your response.
The 2nd condition is :
The text should not contain any other special symbol other than / .
So the condition should be interpreted like, The text would be consists
of alphabets and / only, not any other characters.
Thanking you.
John Gordon wrote:
In <1163012269.707590.302280@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> "Rahul" <ravi.sgn@xxxxxxxxx> writes:
I need a regular expression..
The conditions are as follows...
1. There should not be any blank spaces.
^[^ ]*$
(Note that I interpreted "spaces" literally. If you also wanted to exclude
other space-like characters such as tabs, you'll have to modify this
expression.)
2. Text may or may not contain slashes.
I'm not sure why this condition is even listed. It's okay to have slashes,
but it's also okay not to have them. This condition is meaningless.
--
John Gordon "... What with you being his parents and all,
gordon@xxxxxxxxx I think that you could be trusted not to shaft
him." -- Robert Chang, rec.games.board
.
- Follow-Ups:
- Re: Regular Expression
- From: Jussi Piitulainen
- Re: Regular Expression
- From: Mark
- Re: Regular Expression
- References:
- Regular Expression
- From: Rahul
- Re: Regular Expression
- From: John Gordon
- Regular Expression
- Prev by Date: Re: Design of XML log
- Next by Date: Re: unchecked call to compareTo(T)
- Previous by thread: Re: Regular Expression
- Next by thread: Re: Regular Expression
- Index(es):