regular expression

rule

const <rule name> = /<rugular expression>/

pick

  1. pick for strings that comply with the rules and ruturn boolean

    <rule>.test(<test string>)
  2. search for string that complay with the rules, find ruturn array else return null

    <rule>.exec(<test string>)

replace

<string>.replace(<rule>,<string>)