regular expression for numeric digit starting with '$' sign

I want a regular expression to validate these type of string formats:

$-1000.999
$9999.444
-12344.555
123434.55
0.444455

Also is there any good tool to make regular expressions?

Answers


^\$?\-?(([1-9]{1})([0-9]*)|0)(\.[0-9]*)?$

please check.. this matched your test cases.


Here is the regular expression : \$?-?\d+\.\d+


Need Your Help

ConcurrentSkipListSet and re-sorting (java)

java list sorting concurrency

I am using a ConcurrentSkipListSet, that is obviously accessed through multiple threads. Now, the values that are used by the compareTo-method of the underlying objects change overtime. Because of ...

C++ standard library: initialize a container by using standard input

c++ containers std

We can initialize a container deque by using standard input like this:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.