0

I need to find regex pattern for url and use regex.test() so only string like this:

http://*.margonem.pl/

so it's exactly like above string and where * must appear and can be string which only contains a-z letters without any signs.

BT101
  • 3,226
  • 7
  • 34
  • 72
  • Either `^http://(?:[a-z]+\.)?margonem\.pl/$` or `^http:\/\/(?:[a-z]+\.)?margonem\.pl\/$` (depending on the usage). – revo Oct 18 '19 at 13:31

1 Answers1

1

That would be http:\/\/[a-z]+\.margonem\.pl\/:

Matches

http://a.margonem.pl/
http://foo.margonem.pl/

Does not match

http://hello-world.margonem.pl/
http://abcq443435u4531.margonem.pl/
revo
  • 45,845
  • 14
  • 70
  • 113
grooveplex
  • 2,311
  • 4
  • 27
  • 30