Hello,
I need regex for following requirement .
1. Need regex for decimal number in which i can dynamicaly change its scale. like 12, 123.2, 132.22, 23.2222
2. Need regex for Url which can have http or https or not have this. but url must www.abc.com.
it can be http://www.abc.com
https://www.abc.com.au
or www.abc.com
Thanks in advance.

VulpesPosted Jan 7, 2014, 7:21 AM
Ajay PatelPosted Jan 7, 2014, 6:03 AM
Thanks for reply.
I have tried with regex of decimal digits, it is working fine for static regex.
but when I change regex dynamically it is not working.
like I pass 2 scale then regex must validate following number :
12.23, 12.2, 12
if 3 scale then it should validate 12, 23.1, 23.12, 24.123
In short I need to make regex dynamically for decimal digits
VulpesPosted Jan 6, 2014, 2:34 PM
^\d+(\.\d+)?$
and, for the second one:
^(https?://)?www(\.\w+){2,3}$