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,666
  • 10
  • 41
  • 90
  • 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
  • 47,783
  • 14
  • 74
  • 117
grooveplex
  • 2,492
  • 4
  • 28
  • 30