The greedy regex (robbers)

3

1

This is the robbers' post. The cops' is here.

Your challenge is to take a cop's post and find an input that the regex matches but the program returns a falsey value.

Once you have cracked a cop's post, comment in a link to your crack. (If you don't have enough rep to comment, please say so, and someone will do it for you.) The robber with the most cracks wins.

Example

Let's say a cop's regex is (all of the flavors):

/^[0-9]$/

And the program is (JS):

x=>Boolean(parseInt(x))

Than a valid crack would be 0, because the regex matches 0 but 0 is falsey.

programmer5000

Posted 2017-08-29T01:08:29.687

Reputation: 7 828

Answers

3

Python 3, pperry

İ

Try it online!

The lower case variant of this character is created by a an i and a ċȯṁḃi̇̇ṅi̇̇ṅġ ḋȯṫ which results in a length of 2.

ovs

Posted 2017-08-29T01:08:29.687

Reputation: 21 408

That was the intended solution! – pppery – 2017-08-29T13:08:58.223

3

Python, ppperry

\n

Try it online!

. doesn't match newline by default.

Snack

Posted 2017-08-29T01:08:29.687

Reputation: 251

2

Eli Richardson

Posted 2017-08-29T01:08:29.687

Reputation: 190

1

Java, Roman Gräf

is.is.is.is.

Try it online!

Most things which match the regex crack it, so I'm not sure if the regex is what was intended

PunPun1000

Posted 2017-08-29T01:08:29.687

Reputation: 973

I think the cop misunderstood the challenge, and that you misunderstood the regex : you're right that getting a false from the program while having the regex match is trivial, even more so than you think since (?is) is java's shorthand flag notation and turns on case-insensitivity and single-line mode for the rest of the regex, rather than the positive lookahead which it looks like you understood it as. (little illustration)

– Aaron – 2017-08-29T16:34:20.093

@Aaron I've used those flags before so I really should have noticed that. If you would like to post an answer assuming the cop had true and false switches I encourage it since you spotted the intended answer – PunPun1000 – 2017-08-29T16:38:00.397