7
1
You must make a regex that matches everything except itself. For example, PPCG
must not match PPCG
, but must match everything else, like something
, PPC
, and PPCG!
.
Surrounding slashes are not considered part of the regex in flavors where they are usually part of the syntax. The same is true of all delimiters.
The regex needs to match the entire string, not just a substring.
You may choose your flavor, but you can't use a flavor newer than this challenge. Please pick a flavor that is easily tested.
Shortest regex in bytes wins.
2Related – programmer5000 – 2017-06-09T01:24:39.070
Also, jimmy's solution to the previous challenge can be inverted quite trivially to make a valid answer for this one. – Martin Ender – 2017-06-09T10:54:14.283
1I love how you pointed out a related question on your own question. – Magic Octopus Urn – 2017-06-09T15:04:28.933
2@carusocomputing Why wouldn't they? The point of related links is to make the challenges show up in each others' sidebars. – Martin Ender – 2017-06-09T15:05:12.003
@MartinEnder would assume one would put it in the post itself, not as a comment is all I was saying ;). – Magic Octopus Urn – 2017-06-09T16:02:31.863
Can we use any flags? – jimmy23013 – 2017-06-10T02:21:23.073
Is it acceptable if it matches a substring of itself, but not the entire string? – jimmy23013 – 2017-06-10T02:30:01.473
@jimmy23013 flags: yes substring: no – programmer5000 – 2017-06-10T11:26:14.317
@programmer5000 I mean, it matches entire strings for all other strings, as specified, but only match a substring of itself. – jimmy23013 – 2017-06-10T11:31:20.713