Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
Order By
Most Recent
Most upvotes
Most downvotes
Highest Score
Lowest Score
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 2,520 community submitted regex patterns...
0
Regular expression for positive number with 2 decimals used for displaying money
Java 8
I think from time to time we all need a regular expression for displaying numbers with 2 decimals for displaying money of various currencies in the world. This regex should only allow 1 dot or comma as a decimal separator. And only allow positive numbers and the numbers can't begin with a 0. Goals:...
Submitted by
Remzi Cavdar
-
2 years ago
(Last modified a year ago)
0
Find ID
Python
a
Submitted by
Shaqalito
-
2 years ago
0
Oauth2 client token matcher
Java 8
Grep the token value for almost any JSON response containing an oauth2 token as describe in rfc6749
Submitted by
Pharaphara
-
2 years ago
0
Mt940-61
Java 8
Parse tag 61 of an mt940 statement
Submitted by
anonymous
-
2 years ago
0
grade pattern
Java 8
grade pattern for chinese school grade
Submitted by
anonymous
-
2 years ago
0
DD followed by Month in String
Python
-
Submitted by
anonymous
-
2 years ago
0
EC2 Instance Type
Python
Validates ec2 instance types as of 10/19/22
Submitted by
anonymous
-
2 years ago
0
Inf_lab2
Python
Regular expressions for lab2
Submitted by
anonymous
-
2 years ago
0
Country 2 letters pattern (Any)
Python
That is an example that shows how to match any country code 2 letters pattern
Submitted by
joaosr-adjust
-
2 years ago
(Last modified 2 years ago)
0
Country code with 2 letters (List)
Python
That is an example that shows how to match a country code 2 letters for a list of possible matches
Submitted by
joaosr-adjust
-
2 years ago
(Last modified 2 years ago)
0
Start and Ends with same Letter
Java 8
regex for a string that starts and ends with the same letter
Submitted by
anonymous
-
2 years ago
0
Фильтр русских матов
Java 8
оригинал был взят отсюда: https://gist.github.com/imDaniX/8449f40655fcc1b92ae8d756cbca1264 добавил: сучка, трахать, жопа, залупа
Submitted by
anonymous
-
2 years ago
(Last modified 2 years ago)
0
File Parser
Python
File parser
Submitted by
anonymous
-
2 years ago
0
Add spaces between words and punctuation
Python
Use this twice, and then apply another regex to make this work properly: import re line = 'your text here' line = re.sub(r'([a-zA-z0-9 ])([?,.!:\'\"])([a-zA-z0-9 ]|$)', r'\1 \2 \3', line) line = re.sub(r'([a-zA-z0-9 ])([?,.!:\'\"])([a-zA-z0-9 ]|$)', r'\1 \2 \3', line) line = re.sub(r'[ ]+', ' ', lin...
Submitted by
toiletsandpaper
-
2 years ago
0
Python Regex Tutorial
Python
Python Regex Tutorial CS384
Submitted by
Mayank Agarwal
-
2 years ago
0
Trim whitespace at beginning and/or end of a line
Python
identifies spaces at the beginning and end of lines. Can be used as a Trim function
Submitted by
Eric Hills
-
2 years ago
0
Nashvile chords
Python
Nashvile chords
Submitted by
Marcos
-
2 years ago
0
Extract ICS Codes from string including several wrong formattings
Python
Matches code including character before the code which must NOT be a digit, dot or minus. Therefore, before analyzing a string, add a space in front of it and after analyzing remove the first character of each match. Lookbehind is not used because VBA doesn't support it.
Submitted by
Guido Witt-Dörring
-
2 years ago
(Last modified 2 years ago)
-1
Discord Mention
Python
Regex to check if a string is a discord mention
Submitted by
anonymous
-
2 years ago
(Last modified 2 years ago)
1
AsciiDoc delimited block example
Java 8
https://docs.asciidoctor.org/asciidoc/latest/blocks/delimited/
Submitted by
aisbergde
-
2 years ago
(Last modified 2 years ago)
1
...
14
15
16
17
18
...
126
Community Library Entry
0
Regular Expression
Golang
`
\(\\
?
\"
(
\d
{1,3}
-
?
\d
{1,3}
?
)
[
,|
\s
]
(
.
*
,
?
.
*
?
,
?
.
*
?
\s
)
(
[
A
-
Z0
-
9
]
{3,4}
\s
[
A
-
Z0
-
9
]
{3}
)
\\
?
\"
?
,
(
[
0
-
9
]
{1,3}
.
[
0
-
9
]
{3,9}
)
,
(
[
-|+|
\s
]
?
[
0
-
9
]
{1,3}
.
[
0
-
9
]
{3,9}
)
\)
`
gm
Open regex in editor
Description
for the demo 2019/09/27
Submitted by
anonymous
-
5 years ago