Organizational Research By

Surprising Reserch Topic

how to use Positional special characters?

Two special characters are used in almost all regular expression tools to mark the beginning and end of a line: caret (^) and dollarsign ($). To match a caret or dollarsign as a literal character, you must escape it (i.e. precede it by a backslash "\").

An interesting thing about the caret and dollarsign is that they match zero-width patterns. That is the length of the string matched by a caret or dollarsign by itself is zero (but the rest of the regular expression can still depend on the zero-width match). Many regular expression tools provide another zero-width pattern for word-boundary (\b). Words might be divided by whitespace like spaces, tabs, newlines, or other characters like nulls; the word-boundary pattern matches the actual point where a word starts or ends, not the particular whitespace characters.

asked Sep 13, 2013 in Regular-exp by rajesh
edited Sep 12, 2013
0 votes

Related Hot Questions

1 Answer

0 votes
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013