Regular Expressions 101

Community Patterns

general script detection

1

Regular Expression
PCRE (PHP <7.3)

/
^([\s*\w]+[\.\\\/\-\@\s]*)+[\s\w]$
/

Description

This is a input regex for invaliding inputs that are likely to be scripts. this is a way to hidder xss attacks on your web application and api.

Submitted by ivan - 8 years ago