Regex Cheatsheet - Regular Expression Quick Reference

Quick reference for regular expression patterns. Character classes, quantifiers, anchors, and common patterns.

Share
Back to Regex Cheatsheet

XML Tag Pattern

Common Pattern

Match paired XML tags with content

Pattern

<([a-zA-Z_][a-zA-Z0-9_:.-]*)>([^<]*)<\/\1>

Syntax

Explanation

Uses backreference to ensure opening and closing tags match.

Examples

<name>John</name>

Match paired tags

Matches: <name>John</name>

Related Tools

More Text Tools