Jump to content
Sign in to follow this  
john123

How to match white space with StringRegExp

Recommended Posts

john123

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
oMBRa

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

Share this post


Link to post
Share on other sites
john123

$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  

×