Regular Expressions 101

Sponsors

Library entries

0
pcre2

JSON array of string

\["(.*)"\]
Submitted by anonymous - 4 months ago
0
pcre2

URL

URL
Submitted by anonymous - 4 months ago
0
pcre2

Look Ahead

Look Ahead
Submitted by anonymous - 4 months ago
0
pcre2

oci1

\nPrevious\n(.+\n+)+Time Remaining\n(\d\d:\d\d:\d\d)*
Submitted by anonymous - 4 months ago
0
pcre2

homework4

homework 4
Submitted by Eric Neuwirth - 4 months ago
0
pcre2

regex 1

search api with category and subcategory
Submitted by anonymous - 4 months ago
0
pcre2

Bhumi

Submitted by Ewallet - 4 months ago
0
pcre2

hbase offline state regex

CVP
Submitted by Diego - 4 months ago
0
pcre2

gPat

This is pre-built Global Pat for FortiSiem
Submitted by Ken - 4 months ago
0
pcre2

Test MGNT

just a test
Submitted by dang - 4 months ago

Port range validation

Vote

0

Regular Expression
pcre2

/
(^([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])$)| (^([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])-([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])$)|((?<=,|^)([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])(?=,|$),?)|((?<=,|^)([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])-([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])(?=,|$),?)
/
gm

Description

Loading markdown...
Submitted by anonymous - 8 months ago