Regular Expressions 101

PHP variable name

Open Workspace
  • PCRE (Legacy)
  • Match
13

Regular Expression

/
[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
/

Description

Valid PHP variable name as defined in the manual at http://php.net/manual/en/language.variables.basics.php

Submitted by Erin Millard