How To Check Exact Match In Regex Code Example


Example 1: regex match exact string

you want to achieve a case insensitive match for the word "rocket"  surrounded by non-alphanumeric characters. A regex that would work would be:  \W*((?i)rocket(?-i))\W*

Example 2: regex exact match

use ^ and $ to match the start and end of your string ^matchmeexactly$

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?