tags:

views:

4616

answers:

3

Please tell me how to check regular expression for no blank space b/w text.

+1  A: 

I don't know if it is the regular expression you are looking for but, [:space:] will match any whitespace character, while [:blank:] will match space and tab characters only.

Both are used inside square brackets, e.g. [[:space:]]

xsl
+2  A: 

If you mean "What's the reqular expression to check there is no white space in a string", the following pattern will work:

^[\S]*$

This will find any string that only contains non-white space (spaces, new lines, tabs, etc).

Zhaph - Ben Duguid
A: 

Thanks for the answer

felix
If you like the answer, simply upvote and _maybe_ add a comment. Don't create a new answer to thank for a different answer.
Pete