RaoAkif / regex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

REGEX

Remove That's not Required

Removing a-z, A-Z, 0-9

string = string.replace(/[a-z]/g, '')       //      Remove the small-caps chars
string = string.replace(/[A-Z]/g, '')       //      Remove the big-caps chars
string = string.replace(/[0-9]/g, '')       //      Remove the integers

Removing AlphaNumeric Chars ( Leaving only a-z, A-Z, 0-9 )

string = string.replace(/[^0-9a-zA-Z]/g, '')

Match What's Needed

Only Numbers

string = string.match(/[0-9]/g)

Only Alphabets

string = string.match(/[a-zA-Z]/g)

Material Bread logo

About