Sign in to follow this  
Followers 0
john123

How to match white space with StringRegExp

3 posts in this topic

Hi everybody.

Please help me the way to match white space and "?" character with StringRegExp to check a value in input box.

Exam (value in input box):

useraccount ===> valid

user account ===> not valid

or

useracc ount ===> not valid

useraccount? ===> not valid

Thanks very much.

Share this post


Link to post
Share on other sites



$aString = 'useraccount?'
$a = StringRegExp($aString, '[\s?]', 0)
MsgBox(0, '', $a)

Share this post


Link to post
Share on other sites

$aString = 'useraccount?'
$a = StringRegExp($aString, '[\s?]', 0)
MsgBox(0, '', $a)
Thank you so much.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0