Escape regex meta characters

Published on Tue Mar 01 2022

This expression escapes characters, which have a special meaning in regex, like .?[]/ and so on. Use it to transform a string that you want to use literally in another regex.

Additional matching regexes for
Escape regex meta characters

Escape regex meta characters

This expression escapes characters, which have a special meaning in regex, like .?[]/ and so on. Use it to transform a string that you want to use literally in another regex.

Escape Special Characters

Escapes special characters. Reference: http://www.php.net/manual/en/function.mysql-real-escape-string.php

sha512 - letters and numbers, without special characters. length 512

Just capital **letters and numbers**, **without special characters**. String length 512

Password Complexity

Password Complexity 8-32 Characters, AlphaNumeric with OWASP Special Characters

Remove Special Ascii Characters from unicode String

By Using this string you can just remove ascii special characters from a unicode string characters like ♥♥♥♥ ▓▒ and other non unicode letters.

How to document a regex? Example 1

How to document a regex? Example 1: undocumented Regex which works with my test string

Phone Number

Allows phone numbers with optional country code, optional special characters and whitespace

password with at least 1 special character

**This regex is to describe the password which has at least 7 characters (OC) with at least a special one (SC).** Of course, we know the SC may be in the first, second .... or last of the password. Also, we know the password maybe bigger than just 8. so I wrote the RE to accept any character (AC) from ! to ~ which Contains all characters in the end with * {0, }. but the problem in the beginning before writing 8 characters. - The user may enter 7 AC in the first then SC. - Or 6 AC then SC then at least 1 AC. - Or 5 AC then SC then at least 2 AC. - and so on special characters are : [_https://tools.oratory.com/altcodes.html_](url) ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

Name Validation

Start with capital letter. Allowed special characters '(Apostrophe) -(hyphen) .(dot) (space) and can not end with -(Hyphen)

Password secure but flexable

Must have at leat one number, at leat one capital letter, at least one lower case letter. Also you can have special characters [email protected]$%&*+=-_? if you want for extra security. This is not manditory. Change (?=.*[a-z\[email protected]$%&*+=\-\_?]) to (?=.*[\[email protected]$%&*+=\-\_?]) to make thees special characters manditory. No less than 8 no more thant 20 characters allowed.