What Are Regex Special Characters

Special CharactersDescription\cXMatches a control character ( CTRL + A-Z ), where X is the corresponding letter in the alphabet.\dMatches any digit.\DMatches any non-digit.\fMatches a form feed.

What is regex character set?

With a “character class”, also called “character set”, you can tell the regex engine to match only one out of several characters. Simply place the characters you want to match between square brackets. If you want to match an a or an e, use [ae]. … The order of the characters inside a character class does not matter.

How do you escape special characters in regex?

(here|there).+Matches “there”, a comma, and a space.(\w+)\.Matches “Jerry” and a period.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest