This set of characters is fairly limited: it consists solely of the Roman alphabet in both upper- and lower-case, decimal digits, and the underscore character.
Accented characters, such as "é" or "ü" are, unfortunately, treated as non-word characters for the purposes of word boundaries, as are ideographic characters in general.
You can specify a range of characters by using a hyphen.
Everything that works in the normal character set also works here. A word boundary matches the position between a word character followed by a non-word character, or between a non-word character followed by a word character, or the beginning of the string, or the end of the string.
If used immediately after any of the quantifiers *, , ?
, or , makes the quantifier non-greedy (matching the fewest possible characters), as opposed to the default, which is greedy (matching as many characters as possible).
If you need to use any of the special characters literally (actually searching for a '*', for instance), you must escape it by putting a backslash in front of it.
For instance, to search for 'a' followed by '*' followed by 'b', you'd use —the backslash "escapes" the '*', making it literal instead of special.
Validation of mobile no, username, email id, website url are possible through Regular expressions.For example, the pattern matches character combinations in strings only when exactly the characters 'abc' occur together and in that order.