Regular Expressions 101

Library entries

1
pcre

STEAM GAME KEYS

no description available
Submitted by anonymous - 7 years ago
1
javascript

form regex

no description available
Submitted by anonymous - 6 years ago
1
javascript

Statful Entities Name

no description available
Submitted by anonymous - 6 years ago
1
javascript

double number

no description available
Submitted by anonymous - 6 years ago
1
javascript

dd-MM-yyyy validation

no description available
Submitted by anonymous - 6 years ago
1
javascript

number

no description available
Submitted by anonymous - 6 years ago
1
pcre

Lockbox Sätze #2

no description available
Submitted by anonymous - 6 years ago

Word Wrap examples

Vote

1

Regular Expression
pcre

/
# Version 1: Match 1-80 characters, backtracking # as necessary until whitespace or EOL is reached. # If words > 80 characters (w/o whitespace) are # found, no wrapping is performed on that word. # [807 steps] #(.{1,80})(?:\s|$)|(\S{81,})(?:\s|$) # Version 2: Same as Version 1 but with a # negative look-ahead at the front to skip to the # alternate branch sooner. # [197 steps] #(?!\S{81})(.{1,80})(?:\s|$)|(\S{81,})(?:\s|$) # Version 3: Same as Version 1 but alternations # swapped. # [185 steps] #(\S{81,})(?:\s|$)|(.{1,80})(?:\s|$) # Version 4: Combine alternations into one group. # Change substitution from '\1\2\n' to '\1\n'. # [169 steps] (\S{80,}|.{1,80})(?:\s|$)
/
gmx

Description

Loading markdown...
Submitted by OnlineCop - 6 years ago