Need a Regex
Posted: Thu Mar 27, 2008 12:25 pm
Hi I need a regex which should match the following criteria
1. input string should not contain < followed by >
2. input string should not contain white spaces.
So the regular expression should return false, if the input string contains <something> pattern or spaces.
Ex:
!@~#$%^&*()_+ - true
<dsf adfas df> - false
sdf<sdsdf>sdf - false
dfs<sdf sdf > -false
asdf adf saf - false
sdafasf - true
<sd^&@*#)@) - true
<*&&*(_)#(&$)> - false
&$*(&<DS(^(*>SD^(+ - false
Thanks
1. input string should not contain < followed by >
2. input string should not contain white spaces.
So the regular expression should return false, if the input string contains <something> pattern or spaces.
Ex:
!@~#$%^&*()_+ - true
<dsf adfas df> - false
sdf<sdsdf>sdf - false
dfs<sdf sdf > -false
asdf adf saf - false
sdafasf - true
<sd^&@*#)@) - true
<*&&*(_)#(&$)> - false
&$*(&<DS(^(*>SD^(+ - false
Thanks