Link to home
Start Free TrialLog in
Avatar of MJ
MJFlag for United States of America

asked on

JavaScript Regex for host with varying numbers?

What is the proper Javascript regex to identify wuat[#]live.bank,com? For example:

I need to use in a switch, case statement. Example below is for the production host name:

case /^(www\.bank\.com\/)i.test(currHost):

Open in new window

Thanks!

ASKER CERTIFIED SOLUTION
Avatar of Alex [***Alex140181***]
Alex [***Alex140181***]
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MJ

ASKER

Thank you!
You're welcome ;-)
Just a quick note that the accepted solution also accepts wuatlive.bank.com - hopefully that's ok.
Just a quick note that the accepted solution also accepts wuatlive.bank.com - hopefully that's ok.                                   
If that's NOT ok, just use this one:

^wuat(\d+)live\.bank\.com$

Open in new window