regex - Need help converting a multi-language regular expression to detect a numeric range -


I have created a regular expression that matches any numeric value (with leading or trailing spaces) Or Arabic characters, I now need to modify it only to match some special values ​​(such as 1900-19 50).

  (^ \ s * -? \ D + \ s * $) | (^ \ S * -? [\ U0660- \ u0669] + \ s * $)  

I'm very stuck. Anyone have any suggestions?

It seems that there is a bad use for a regular expression - very easy (and created) Simple to keep!) The approach will match any number, and then make a simple comparison of the code to check whether it is within your range or not.

As a side note, do you really want to include spaces in the match? Do not understand more to move \ s * out of the legs?


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -