[英]What should be the regular expression which matches exactly one $ (dollar) followed by any number of digits?
$ : 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
$
is a special character that represents the end of the string. $
是一个特殊字符,表示字符串的结尾。
Escaping the dollar symbol should solve your problem:转义美元符号应该可以解决您的问题:
^\$\d*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.