• Skip to main content
  • Skip to primary sidebar

Technipages

Smart phone, gadget and computer tutorials

  • Topics
    • Android
    • Gaming
    • Hardware
    • Internet
    • iOS
    • MacOS
    • Office
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About

Regular Expression (Regexp)

Posted on August 16, 2019 by Mel Hawthorne

Regular expression or Regex (also regexp) is a notation system for describing a search pattern defined by a sequence of characters. It is primarily used for search and replace, data validation and string parsing. Regex is based on formal language theory and consists of constants (called “literal characters”) which define sets of strings and operator symbols (called “meta-characters”) which define operations to be performed on these sets.

Technipages Explains Regular Expression (Regexp)

A singular search term is called a regular expression or pattern, it is used to match a single or set of strings as required for a purpose, there are multiple ways to define a pattern that will match identical strings.
Inside each pattern, there are literal characters such as “a” which literally mean what the character says be it a digit, letter or symbol. Meta-characters such as “{“ which have a defined meaning, this may change how related characters are interpreted, act as a type of wildcard or define a subexpression etc. Finally, there is the escape character “\” which is used to turn a meta-character into a literal character.

There are two sets of standards for regex: “Perl compatible” which is based on an implementation of Regex in the language Perl which is known for its expressive power and relative ease of reading. The other standard is “IEEE POSIX” which has two flavours the extended flavour adds 3 meta-characters and modifies how others work compared to the basic flavour.

The mathematician Stephen Cole first described regular languages in a mathematical notation he called “regular events” in 1951, in 1968 regular expression gained mainstream traction in text editors for pattern matching and in compilers. Since then Regex has been implemented in many different programming languages and advanced text editors, a number of standard regex libraries are readily available for reuse.

Common Uses of Regular Expression (Regexp)

  • The syntax for regular expression is complex.
  • Regular expression is a powerful find and replace tool.
  • Regex has two sets of standards used for different purposes.

Common Misuses of Regular Expression (Regexp)

  • Regular expression is a programming language.

Primary Sidebar

Recent Posts

  • Can’t Connect to Google Play? Try These Useful Tips
  • How to Fix Zoom Error Code 614
  • Google Duo on Android: How To Enable Low-Light Mode
  • Troubleshooting Zoom Error 3065
  • How to Fix Microsoft Teams Error caa82ee2
  • Zoom: How to Change the Size of the Text in Chat Windows
  • Slack: How To Change Your Display Name
  • WhatsApp: How to Hide Your Profile Picture from a Specific Contact

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

Follow me on Twitter, or visit my personal blog.

You May Also Like

© Copyright 2021 Technipages · All Rights Reserved · Privacy