What is "matches regex" ?

Discussion in 'Search Engine Optimization' started by zoyabhatt, Sep 21, 2018.

  1. zoyabhatt

    zoyabhatt
    uix_expand uix_collapse
    New Member

    Joined:
    Apr 26, 2018
    Messages:
    9
    Likes Received:
    2
    What is "matches regex" for?
     
  2. BA

    BA
    uix_expand uix_collapse
    Community Liaison
    Community Liaison 2.0

    Joined:
    Sep 18, 2015
    Messages:
    304
    Likes Received:
    29
    It's to match a string pattern. If you wanted to match only numbers you could create regex like ^[0-9]*$
    which matches digits or if you wanted to match smith or smiths. You could make a regex something like 'smith.' The dot is a wildcard.

    A common use is to validate an email address and make sure it's has an @ sign and a .com, etc. You can test regex's here. https://regex101.com/
     

Share This Page