Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-12-23 01:23
Flavor·PCRE (Legacy)

/
[^a-zA-Z_\x7f-\xff\d]
/
g
Open regex in editor

Description

This can be used in a preg_replace function to take any string value and strip all invalid characters to make a valid PHP variable

Submitted by Deathnerd