Regular Expressions 101

Finnish Mobile Number Validation

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
^((04[0-9]{1})(\s?|-?)|050(\s?|-?)|0457(\s?|-?)|[+]?358(\s?|-?)50|0358(\s?|-?)50|00358(\s?|-?)50|[+]?358(\s?|-?)4[0-9]{1}|0358(\s?|-?)4[0-9]{1}|00358(\s?|-?)4[0-9]{1})(\s?|-?)(([0-9]{3,4})(\s|\-)?[0-9]{1,4})$
/
gm

Description

Checks for valid Finnish mobile numbers, takes in to account possible operator codes, different ways of marking country code if supplied and allows for hyphens and spaces in places where they are commonly used.

Submitted by Anonymous