Regex

Allow Everything

Except spaces

^[^ ]+$

Except spaces & new lines

^[^\n ]+$

Except the word "hello"

^[^hello]+$

Only Allow

Uppercase alphabets

^[A-Z]+$

Numbers

^[0-1]+$

Alphanumeric uppercase & lowercase and spaces

^[a-zA-z0-1 ]+$

Uppercase alphabets with hyphens and underscores

^[A-Z-_]+$

String contains

Match a string in between another string

string

PHP Storm

Replace custom attributes with anything inside of them

employee-id="[^"]*"