Octal String Regular Expression

A regular expression to match and validate an Octal String.

/^([0-7])*$/

Matches

  • 162145147145170
  • 160141
  • 143157155

Non-matches:

  • 12345678
  • 97654321
  • abcdefg