Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    \$\begingroup\$ You're mishandling special regexp characters like "." though \$\endgroup\$ Commented Jan 26, 2021 at 18:02
  • \$\begingroup\$ @StefanReich You're right, but the same applies to almost any other existing answer, though. But I've added a note to mention this in the answer (and golfed it by 3 bytes at the same time). \$\endgroup\$ Commented Jan 26, 2021 at 19:44
  • \$\begingroup\$ Come on... you're saying there is a bug in THIS? >> à øV << (the Japt program, whatever that is) \$\endgroup\$ Commented Jan 26, 2021 at 21:53
  • \$\begingroup\$ @StefanReich The golfing languages like Jelly, Japt, 05AB1E, etc. are probably fine, since most of them just use the powerset and check if the second input is in it. I was referring to the answers using regex like mine, like the accepted Perl answer; the Python answer of Eric; the Ruby answer; etc. All answers that use regex are similar as mine (add a ".*" after each characters, and check if it matches the second input) are most likely invalid if the inputs contain special regex characters. \$\endgroup\$ Commented Jan 26, 2021 at 22:07
  • \$\begingroup\$ I was just messing around :) \$\endgroup\$ Commented Jan 26, 2021 at 22:43