$ : match results $
$637 : match results $637
$$ : match results $
$272$ : match results $272
$262$$ : match results $272
$$445: match results $
3727 : match results null
2727$: match results null
Asked
Active
Viewed 33 times
-3

Mike Cluck
- 31,869
- 13
- 80
- 91

himanshu
- 188
- 2
- 16
-
I don't see any code that you have tried. Could you tell us what you have done so far and what you're stuck on? – Mike Cluck Feb 02 '17 at 20:02
-
Possible duplicate of [Reference - What does this regex mean?](http://stackoverflow.com/questions/22937618/reference-what-does-this-regex-mean) – Jordan Running Feb 02 '17 at 20:04
-
Hi Mike. I want to replace all the characters from a string except $ followed by any digit. String should contain $26272 I.e [Dollar][digit] format only – himanshu Feb 02 '17 at 20:14
1 Answers
0
$
is a special character that represents the end of the string.
Escaping the dollar symbol should solve your problem:
^\$\d*

TimoStaudinger
- 41,396
- 16
- 88
- 94