Regex Linking Examples

These examples are for the regular expression enthusiasts out there.

Regular Expression 101 | Advanced Regex Patterns | Regex and Python

Sub%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81

Regular Expression 101

Learn the basics, the fun way!

This page contains a simple example:

import re
match = re.search('Hello, world!', 'Hello, world!')
print(match.group())

A regular expression is a sequence of characters that defines the rules for a particular search pattern in text.

For example, the pattern 'Hello, world!' matches 'Hello, world!'.

Want to learn more? Visit our Regular Expression Basics page for more information.

sub%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81

Advanced Regex Patterns

Take your regex skills to the next level!

This page contains some advanced regex patterns for you to try:

import re
match = re.search('123-456', '123-456')
print(match.group())

This pattern uses the '-' character as a literal character in the search pattern.

Want to learn more? Visit our Advanced Patterns page for more information.

sub%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81

Regex and Python

Use regular expressions in Python for fun and profit!

This page contains a simple example of using regex in Python:

import re
match = re.search('123-456', '123-456')
print(match.group())

This pattern uses the 're' module in Python to search for the pattern '123-456'.

Want to learn more? Visit our Advanced Regex in Python page for more information.