Regex tutorial Case sensitive consonants

Published on Tue Mar 01 2022

With regex you can count the number of matches. Can you make it return the number of uppercase consonants (B,C,D,F,..,X,Y,Z) in a given string? E.g.: it should return 3 with the text ABcDeFO!. Note: Only ASCII. We consider Y to be a consonant! Example: the regex /./g will return 3 when run against the string abc.

Additional matching regexes for
Regex tutorial Case sensitive consonants

Regex tutorial Case sensitive consonants

With regex you can count the number of matches. Can you make it return the number of uppercase consonants (B,C,D,F,..,X,Y,Z) in a given string? E.g.: it should return 3 with the text ABcDeFO!. Note: Only ASCII. We consider Y to be a consonant! Example: the regex /./g will return 3 when run against the string abc.

Match at least One upper, lower, number and Special char.

Determines if string contains: 1 Uppercase 1 Lowercase 1 Number 1 Symbol

Password (4 Classes)

1 Uppercase 1 lower case 1 number 1 not a number or letter

Get text within pipe placeholders

Will return all matches of text between pipe placeholders, e.g. "This text has |two| placeholders |inside| of it" will return matches for two and inside.

Strict Password Validator

**This regex matches only when all the following are true:** password must contain 1 number (0-9) password must contain 1 uppercase letters password must contain 1 lowercase letters password must contain 1 non-alpha numeric number password is 8-16 characters with no space

Strong password

Password require: lowercase, uppercase, symbol, not consecutive same letter/number, and not some specific words

Password

Safe Password that allow only with a number, a lowercase, a uppercase, and a special character

Title Casing

for use in function to title case a string; function cap(str) { return str.replace(/\w\S*/g, function(txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); }

Nth match

Matches the nth five digit number

just number and String length 30

just number and String length 30