Quick Start
Tutorial
Search & Replace
Tools & Languages
Examples
Reference
Regex Reference
Introduction
Table of Contents
Quick Reference
Characters
Basic Features
Character Classes
Shorthands
Anchors
Word Boundaries
Quantifiers
Capturing Groups & Backreferences
Named Groups & Backreferences
Special Groups
Unicode Characters and Properties
Unicode Versions
Unicode Categories
Unicode Scripts
Unicode Blocks
Unicode Binary Properties
Unicode Property Sets
Unicode Boundaries
Mode Modifiers
Recursion & Balancing Groups
Backtracking Control Verbs
Replacement Reference
Characters
Matched Text & Backreferences
Case Conversion
Context
Conditionals
More on This Site
Introduction
Regular Expressions Quick Start
Regular Expressions Tutorial
Replacement Strings Tutorial
Applications and Languages
Regular Expressions Examples
Regular Expressions Reference
Replacement Strings Reference
Book Reviews
Printable PDF
About This Site
RSS Feed & Blog
RegexBuddy—Better than a regular expression reference!

Regular Expression Unicode Categories Reference

This table explains which syntax is supported for matching Unicode categories, which is one kind of Unicode property that flavors may support. The table does not list the names of all the Unicode categories because they are the same for all versions of Unicode. If a flavor supports a particular syntax for categories then it supports all categories with that syntax. You can find the list of categories in the tutorial section. Exactly which characters are matched by these categories depends on the Unicode version that the regex flavor is based on.

FeatureSyntaxDescriptionExampleJGsoft Python JavaScript VBScript XRegExp .NET Java ICU RE2 Perl PCRE PCRE2 PHP Delphi R Ruby std::regex Boost Tcl POSIX GNU Oracle XML XPath
Unicode category \pL where L is a single-letter Unicode category Matches a single Unicode code point in the specified Unicode category. \pL matches à encoded as U+00E0; \pS matches © YESnononoYESnoYESnodefaultYES5.0YESYESYESYESnonononononononono
Unicode category \PL where L is a single-letter Unicode category Matches a single Unicode code point that is not in the specified Unicode category. \PS matches à encoded as U+00E0; \PL matches © YESnononoYESnoYESnodefaultYES5.0YESYESYESYESnonononononononono
Unicode category \p{Ll} where Ll is a Unicode category Matches a single Unicode code point in the specified Unicode category. \p{Ll} matches à encoded as U+00E0; \p{S} matches © YESnowith /unoYESYESYESYESdefaultYES5.0YESYESYESYES1.9nonononononoYESYES
Unicode category \p{IsLl} where Ll is a single-letter or two-letter Unicode category Matches a single Unicode code point in the specified Unicode category. \p{IsLl} matches à encoded as U+00E0; \p{IsS} matches © YESnononononoYES63noYESnononononononononononononono
Unicode category \p{Category} Matches a single Unicode code point in the specified Unicode category. \p{Letter} matches à encoded as U+00E0; \p{Symbol} matches © YESnowith /unoYESnonoYESnoYESnonononono1.9nononononononono
Unicode category \p{IsCategory} Matches a single Unicode code point in the specified Unicode category. \p{IsLetter} matches à encoded as U+00E0; \p{IsSymbol} matches © YESnononononono63noYESnononononononononononononono
Unicode category \p{L&} Matches a single Unicode code point that is in the uppercase letter, lowercase letter, or titlecase letter category. \p{L&} matches A, a, and Lj. YESnonononononononoYES6.5YESYESYESYESnonononononononono
Unicode category \p{Letter&} Matches a single Unicode code point that is in the uppercase letter, lowercase letter, or titlecase letter category. \p{Letter&} matches A, a, and Lj. YESnonononononononononononononononononononononono
Unicode category \p{Lc} Matches a single Unicode code point that is in the uppercase letter, lowercase letter, or titlecase letter category. \p{Lc} matches A, a, and Lj. nonowith /unoYESno6YESnoYESno10.408.2.0no4.2.22.0nononononononono
Unicode category \p{Cased_Letter} Matches a single Unicode code point that is in the uppercase letter, lowercase letter, or titlecase letter category. \p{Cased_Letter} matches A, a, and Lj. V2nononoYESnonoYESnoYESnonononono2.0nononononononono
FeatureSyntaxDescriptionExampleJGsoft Python JavaScript VBScript XRegExp .NET Java ICU RE2 Perl PCRE PCRE2 PHP Delphi R Ruby std::regex Boost Tcl POSIX GNU Oracle XML XPath