Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Social
Join the Discord community!
Follow me on twitter!
Send me an email
Donate
Donate
Donate through Paypal
Become a Github Sponsor
Info
Info
Find out what's new!
RegEx101 Wiki
Report bugs or make suggestions
What's new?
Loading content...
Close
Regex Editor
Regex Editor
Community Patterns
Community Patterns
Account
Account
Regex Quiz
Regex Quiz
Settings
Settings
Live Help
Live Help
Get help on Discord
Get help on IRC
Order By
Most Recent
Highest Score
Lowest Score
Most upvotes
Most downvotes
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET (C#)
Rust
Sponsors
Community Patterns
Search among 11,660 community submitted regex patterns...
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
pythonize beautiful query
PCRE2 (PHP >=7.3)
pythonize beautiful query
Submitted by
anonymous
-
10 months ago
2023-02-01 16:14
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Extract any http https and any url form
PCRE (PHP <7.3)
This will help you to extract any URL inside your text
Submitted by
Abdullah Alweheid
-
10 months ago
2023-01-31 22:18
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Parcing2
PCRE (PHP <7.3)
aa
Submitted by
anonymous
-
10 months ago
2023-01-31 20:03
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Get path from any text
PCRE2 (PHP >=7.3)
Get path (windows style) from any type of text (error message, e-mail corps ...), quoted or not. THIS IS COMMENTED VERSION !_ to simple copy and use it, go https://regex101.com/r/zWGLMP Relative path are not supported...
Submitted by
nitrateag
-
10 months ago
2023-01-31 14:39
(Last modified 7 months ago)
2023-05-04 12:23
12
14 upvotes, 2 downvotes (score 70.4%) (You must be signed in to vote)
Get path from any text
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE2 (PHP >=7.3)
Get path (windows style) from any type of text (error message, e-mail corps ...), quoted or not. THIS IS THE SINGLE LINE VERSION !_ If you want understand how it work or edit it, go https://regex101.com/r/7o2fyy Relative path are not supported...
Submitted by
nitrateag
-
10 months ago
2023-01-31 14:38
(Last modified 4 months ago)
2023-07-23 20:17
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Youtube API V3 Video list convert duration
PCRE2 (PHP >=7.3)
Convert the YouTube API V3 videos list, duration of videos to separate numbers for calculations.
Submitted by
Bo
-
10 months ago
2023-01-31 13:39
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
trim phone number
PCRE (PHP <7.3)
trim phone number
Submitted by
anonymous
-
10 months ago
2023-01-31 12:39
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Capture optional HTML tag attributes in any order
PCRE2 (PHP >=7.3)
We often see some regular expressions to manipulate HTML instead of using a DOM parser. But well, in some cases we haven't got the parser or efficiency is a question of concern. In most cases I think the best is to use both together. First a simple and bullet-proof regex to extract data from the HTM...
Submitted by
Patrick Janser
-
10 months ago
2023-01-31 08:47
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
log timestamp
Golang
extract time stamp from log entry
Submitted by
anonymous
-
10 months ago
2023-01-30 15:42
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Match HTML comments with nested comments
PCRE (PHP <7.3)
Even if this is not valid HTML, it's more to understand the concept of recursion in patterns. It was an answer to a Stack overflow question: https://stackoverflow.com/questions/75282404/remove-comments-from-some-generated-html-which-can-be-invalid-with-nested-commen The idea is to use PCRE's recur...
Submitted by
Patrick Janser
-
10 months ago
2023-01-30 13:50
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Search Trailing Commas
PCRE (PHP <7.3)
Regex used for finding trailing commas. Use for troubleshooting PHP 7.2 Codes
Submitted by
anonymous
-
10 months ago
2023-01-30 11:13
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Math any kind of letter
PCRE2 (PHP >=7.3)
Just a quick example of the \p{L} pattern
Submitted by
anonymous
-
10 months ago
2023-01-30 02:12
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Storyblok Assets
PCRE2 (PHP >=7.3)
Match paths for a.storyblok.com
Submitted by
anonymous
-
10 months ago
2023-01-28 09:39
(Last modified 10 months ago)
2023-01-28 09:39
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Init code
PCRE2 (PHP >=7.3)
Init code
Submitted by
anonymous
-
10 months ago
2023-01-27 22:11
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
find all wikipedia links in a text
PCRE2 (PHP >=7.3)
a regex that finds all expressions that start with "(https://en.wikipedia.org/wiki" and end with a closing bracket.
Submitted by
David
-
10 months ago
2023-01-27 11:23
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Start with t or T and some number and End with <String>
PCRE2 (PHP >=7.3)
Some custom pattern matching where a string start with t and end with any string, for example - t123_click, t1234_click_submit, T12_click_click_skip
Submitted by
Jaswinder
-
10 months ago
2023-01-27 10:08
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
patternmatching
PCRE2 (PHP >=7.3)
pattern to ensure keywords are picked up if words on either side
Submitted by
anonymous
-
10 months ago
2023-01-27 10:01
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
PCRE destination filename matcher
PCRE2 (PHP >=7.3)
Matches the most advanced filename for a given version as per my file naming conventions.
Submitted by
Robert Larkins
-
10 months ago
2023-01-26 13:43
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
PSMFC-ELogUserRegex
PCRE2 (PHP >=7.3)
allow simple usernames starting with a letter, containing . - and _ or an email
Submitted by
anonymous
-
10 months ago
2023-01-25 19:39
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
AAU CPR validation (more rebust)
PCRE2 (PHP >=7.3)
This one makes sure to not match 31 in months where it does not exist and cuts off february at 28. Might need to do special check for 29th of february ..?
Submitted by
anonymous
-
10 months ago
2023-01-25 11:33
1
...
30
31
32
33
34
35
36
...
583
COINGBIT
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
\w
+
$
7
.
000
.
000
.
000
/
Open regex in editor
Description
Loading markdown...
Submitted by
COINGBIT
-
a year ago
2022-12-19 14:17
(Last modified a year ago)
2023-01-06 17:29