I am trying to delete everything after the .com, .etc, in a URL; to make it more meaningful
so
sub.domain.com/324fr9?=awerf?=awrf
turns to
sub.domain.com/
except the same regex doesn’t work for
noSubDomain.com/crap?=yes123456789timesOver
because it only has one dot, not two!
Here’s my regex(javascript):
/.*:\/\/.*\..*\.com/g
Here’s the part that matters:
(.*\.)?The question mark says that everything in that group is optional.