Skip to main content
Tweeted twitter.com/#!/StackCodeGolf/status/440165094887272448
added details about matching
Source Link
GOTO 0
  • 822
  • 5
  • 14

Your task here is to write two regular expressions, each of which matches the other one but does not match itself.

Both regular expressions should have this form:

/pattern/optional-flags

This is also the form in which they should be matched.

The shortest solution wins. The solution length is counted as the sum of characters in both regular expressions including slashes and flags.

Use a regex syntax standard of your choice, or specify a programming language, when it makes a difference.

Have fun!

Your task here is to write two regular expressions, each of which matches the other one but does not match itself.

Both regular expressions should have this form:

/pattern/optional-flags

The shortest solution wins. The solution length is counted as the sum of characters in both regular expressions including slashes and flags.

Use a regex syntax standard of your choice, or specify a programming language, when it makes a difference.

Have fun!

Your task here is to write two regular expressions, each of which matches the other one but does not match itself.

Both regular expressions should have this form:

/pattern/optional-flags

This is also the form in which they should be matched.

The shortest solution wins. The solution length is counted as the sum of characters in both regular expressions including slashes and flags.

Use a regex syntax standard of your choice, or specify a programming language, when it makes a difference.

Have fun!

Source Link
GOTO 0
  • 822
  • 5
  • 14

Cross-matching regular expressions

Your task here is to write two regular expressions, each of which matches the other one but does not match itself.

Both regular expressions should have this form:

/pattern/optional-flags

The shortest solution wins. The solution length is counted as the sum of characters in both regular expressions including slashes and flags.

Use a regex syntax standard of your choice, or specify a programming language, when it makes a difference.

Have fun!