-2

[a-zA-Z0-9]+$

I want to know what is the use of $ in regular expression generally.

I searched in net and got matches at the end of the string

but didn't understand practically.

vks
  • 63,206
  • 9
  • 78
  • 110
IYAZ.F
  • 3
  • 1
  • 7
  • Possible duplicate of [Reference - What does this regex mean?](http://stackoverflow.com/questions/22937618/reference-what-does-this-regex-mean). Also see http://stackoverflow.com/questions/29851024. – Sebastian Simon Jun 23 '15 at 06:36
  • check https://regex101.com/r/vH0iN5/8 – vks Jun 23 '15 at 06:36
  • $ is an anchor that will represent the end of a string. Have a look here : http://www.regular-expressions.info/anchors.html – Shaulian Jun 23 '15 at 06:38
  • Check out a live regex editor (e.g. http://www.phpliveregex.com ), where you can fiddle around with various expressions and see the effect. Compare, say, `[a-z_]+` and `[a-z_]+$`. – Luke Jun 23 '15 at 06:39

1 Answers1

0

Your quote is pretty clear, once you've understood. It means that the string that you are looking for, must end with the content of the regular expression.

In this case, the string must end like that ˋ[a-zA-Z0-9]ˋ