Regular Expressions 101

Sponsors

Library entries

0
pcre2

Matching a decimal numbers

Matching a decimal numbers
Submitted by anonymous - 5 months ago
0
pcre2

find spaces around - & + signs

find spaces around - & + signs
Submitted by anonymous - 5 months ago
0
pcre2

Search Engine Marketing

Yurrr
Submitted by anonymous - 5 months ago
0
pcre2

C######

get C with numbers string
Submitted by Didier - 5 months ago
0
pcre2

All

all
Submitted by anonymous - 5 months ago
0
pcre2

url-selection

url-selection
Submitted by anonymous - 4 months ago
0
pcre2

german locale regex

Matches locales with german language
Submitted by anonymous - 4 months ago
0
pcre2

Mick Find Image

Finds stuff like 01 Image.. or 01 Image.
Submitted by anonymous - 4 months ago

Numbers, units, and tolerances

Vote

0

Regular Expression
pcre2

/
(?<![\p{Pd}\x{2212}\w])(?<number>[\p{Pd}\x{2212}]?\d+|\d+\.|\d+\.\d+|\.\d+)\p{Zs}*(?<unit>%|(?:[Mkdcm]?bar|mmHg|ha|min|\xC5)|(?:(?:[KMGTPEZY]i)?(?:bit|[bB]))|m?Np|(?:(?:da|[YZEPTGMkhdcm\x{03bc}npfazy])?(?:Wb|Sv|Hz|sr|mol|lm|lx|cd|rad|Pa|Bq|Da|eV|ua|Gy|kat|°C|[gmsulAKNJWCVFSTHL\x{03a9}]))|dB(?:FS|iC|m0s?|mV|ov|pp|rnC|sm|TP|\x{03bc}V|\x{03bc}0s|VU| HL| Q| SIL| SPL| SWL|\/K|-Hz|[ABcCdefGiJkKmoOqruvVWZ\x{03bc}])?|[hdta])(?:(?:\p{Zs}*\+(?<pos_tolerance>\d+|\d+\.|\d+\.\d+|\.\d+)\p{Zs}*(?<pos_unit>%|(?:[Mkdcm]?bar|mmHg|ha|min|\xC5)|(?:(?:[KMGTPEZY]i)?(?:bit|[bB]))|m?Np|(?:(?:da|[YZEPTGMkhdcm\x{03bc}npfazy])?(?:Wb|Sv|Hz|sr|mol|lm|lx|cd|rad|Pa|Bq|Da|eV|ua|Gy|kat|°C|[gmsulAKNJWCVFSTHL\x{03a9}]))|dB(?:FS|iC|m0s?|mV|ov|pp|rnC|sm|TP|\x{03bc}V|\x{03bc}0s|VU| HL| Q| SIL| SPL| SWL|\/K|-Hz|[ABcCdefGiJkKmoOqruvVWZ\x{03bc}])?|[hdta])?\p{Zs}*\/\p{Zs}*[\p{Pd}\x{2212}](?<neg_tolerance>\d+|\d+\.|\d+\.\d+|\.\d+)\p{Zs}*(?<neg_unit>%|(?:[Mkdcm]?bar|mmHg|ha|min|\xC5)|(?:(?:[KMGTPEZY]i)?(?:bit|[bB]))|m?Np|(?:(?:da|[YZEPTGMkhdcm\x{03bc}npfazy])?(?:Wb|Sv|Hz|sr|mol|lm|lx|cd|rad|Pa|Bq|Da|eV|ua|Gy|kat|°C|[gmsulAKNJWCVFSTHL\x{03a9}]))|dB(?:FS|iC|m0s?|mV|ov|pp|rnC|sm|TP|\x{03bc}V|\x{03bc}0s|VU| HL| Q| SIL| SPL| SWL|\/K|-Hz|[ABcCdefGiJkKmoOqruvVWZ\x{03bc}])?|[hdta]))|(?:\p{Zs}*±\p{Zs}*(?<tolerance>\d+|\d+\.|\d+\.\d+|\.\d+)\p{Zs}*(?<tolerance_unit>%|(?:[Mkdcm]?bar|mmHg|ha|min|\xC5)|(?:(?:[KMGTPEZY]i)?(?:bit|[bB]))|m?Np|(?:(?:da|[YZEPTGMkhdcm\x{03bc}npfazy])?(?:Wb|Sv|Hz|sr|mol|lm|lx|cd|rad|Pa|Bq|Da|eV|ua|Gy|kat|°C|[gmsulAKNJWCVFSTHL\x{03a9}]))|dB(?:FS|iC|m0s?|mV|ov|pp|rnC|sm|TP|\x{03bc}V|\x{03bc}0s|VU| HL| Q| SIL| SPL| SWL|\/K|-Hz|[ABcCdefGiJkKmoOqruvVWZ\x{03bc}])?|[hdta])))?(?![\p{Pd}\x{2212}\w])
/
gm

Description

Loading markdown...
Submitted by nessalc - 5 months ago