3

I have found that,

$ :       Matches the end of the line
\s:       Matches whitespace 
\S:       Matches any non-whitespace character

But what exactly does \$ do ?

MAX
  • 1,562
  • 4
  • 17
  • 25

2 Answers2

6

\$ will help to find the character "$" available in the content based on the expression flags assigned to the regular expression.

Say for example:

\$: only find the single "$" in a content \$/g: find the "$" globally available in content.

Please find the screenshot, which can give you clear idea.

\$: Expression \$ \$ with Global expression: \$ with Global expression

BHUVANESH MOHANKUMAR
  • 2,747
  • 1
  • 33
  • 33
2

\$ just escapes the $ character so it will match $ literally

10100111001
  • 1,832
  • 1
  • 11
  • 7