•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

Regex: regular expression cheat sheet

  • Home
  • Client
  • Knowledgebase
  • Devices
  • CDN
  • Regex: regular expression cheat sheet

Table Of Content

Related Articles

  • Reference Architecture - Active-Active Configuration (Using CDN)
  • Create CDN Domain
  • Manage CDN Domain
  • Manage CDN Services
  • CDN Intro
  • How to move existing domain from one CDN device to another
  • IP's for Psychz Networks CDN edge servers
  • Order CDN Service
  • Complete Guide To Psychz's CDN
  • Reading real IPs
  • Views: (1049)
  • Votes: (0)
Was this article helpful?
VOTE

Regex: regular expression cheat sheet

Publisher: Psychz Networks,  August 23,2018

"REGEX" abbreviation for Regular expressions are highly useful in extracting information from any text by using a particular search pattern (ASCII or Unicode characters) for one or more matches.

Regex is used in many applications ranging from web scraping, translating data to other formats, validation to parsing/replacing strings.

This tool is compatible with almost all the programming languages including JavaScript, Java, VB, C #, C / C++, Python, and many others).

Anchors — ^ and $

^

This symbol indicates start of a string

$

This symbol indicates end of a string

Quantifiers — * + ? and {}

The symbols '*', '+', and '?', denote the number of times a character or a sequence of characters may occur. What they mean is: "zero or more", "one or more", and "zero or one."
You can also use bounds, which appear inside braces {} and indicate ranges in the number of occurrences:

*

Matches 0 or more of the previous character (e.g. ab*c will generate output as “ac”, “abc”, “abbc”, etc.

?

Matches 0 or 1 of the previous character

+

Matches 1 or more of the previous character

{x}

Matches exactly x number of times

{x, y}

Matches everything between x, y characters

OR operator — | or []

|

Matches a character or group of characters on either side (e.g. a|b corresponds to a or b)

[]

This works exactly as previous

Character classes — \d \w \s and .

\d

Matches one digit

\D

Performs inverse matches of \d

\w

Matches a word character

\W

Performs inverse matches of \w

\s

Matches a whitespace character

\S

Performs inverse matches of \s

.

Matches any character*. Hence called a Wildcard ; *except newline (/n).

Related Articles

  • Reference Architecture - Active-Active Configuration (Using CDN)
  • Create CDN Domain
  • Manage CDN Domain
  • Manage CDN Services
  • CDN Intro
  • How to move existing domain from one CDN device to another
  • IP's for Psychz Networks CDN edge servers
  • Order CDN Service
  • Complete Guide To Psychz's CDN
  • Reading real IPs
  • Views: (1049)
  • Votes: (0)
Was this article helpful?
VOTE
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801