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
Post a Comment