I am trying to solve a regex puzzle, and the regex parts are made up of the following parts:
([^Xa-ehY]|[^f-zW])
or
([^2]|[^D-Za]|[D-Ze-f])
It bothers me.
Take the first one, for example: [^Xa-ehY]|[^f-zW]) . Doesn't that mean "not Xa-ehY OR not f-zW"? And doesnβt this correspond to "any character"? Take e , for example. This is not the first, but the second. W does not match the second, but matches the first.
Same thing with ([^2]|[^D-Za]|[D-Ze-f]) . This means "not 2 OR not D-Ze-f OR D-Ze-f", right? This again means "any character."
Am I missing something? Is this just a confusing substitution for one regex . ?
source share