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.

3
  • 5
    That's not what switch does. You want preg_match in an if..else.
    – deceze
    Commented Oct 12, 2017 at 8:49
  • You could try with preg_match(): an answer here enter link description here
    – th3fr33man
    Commented Oct 12, 2017 at 8:55
  • Thank you guys, it worked, also is there an option to limit the amount of "any" characters to 7? It's not as important, but would be useful
    – fenbekus
    Commented Oct 12, 2017 at 9:01