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
  • \$\begingroup\$ I think this doesn't totally work, try ("aaaaaaa",["aa","aaa"]). \$\endgroup\$ Commented Apr 28, 2017 at 1:44
  • \$\begingroup\$ @xnor I updated it. Come to find out, regex is perfect for this. \$\endgroup\$ Commented Apr 28, 2017 at 3:55
  • 4
    \$\begingroup\$ Should fail for ('x', '.'), I guess, but doesn't. \$\endgroup\$ Commented Apr 28, 2017 at 7:31
  • 1
    \$\begingroup\$ @nfnneil Did you? Your last edit was 10 hours ago. \$\endgroup\$ Commented Apr 28, 2017 at 14:25
  • 1
    \$\begingroup\$ ...or "Hello", ["\w"] etc. \$\endgroup\$ Commented Apr 29, 2017 at 20:30