0

I’m trying to write regex

  • https://.*ABCD
  • https://.*ABCD.view
  • https://.*ABCD_1
  • https://.*ABCD_r

If there are these 4 urls, i’d like to export only these https://.*ABCD, https://.*ABCD.view 2 urls, not these urls https://.*ABCD_1, https://.*ABCD_r

I was trying to make it like this

https://.*ABCD.*

But this one includes these urls https://.*ABCD_1, https://.*ABCD_r

I googled it but no luck.

How can i fix and write regex?

Toto
  • 89,455
  • 62
  • 89
  • 125
Juyeon
  • 1
  • 1

1 Answers1

0

This regex excludes underscore and space for valid URL:

^https://[^_\s]+$

Try this tool for different regex:

https://regex101.com/

DigitShifter
  • 801
  • 5
  • 12