Regular Expressions 101

Library entries

Lazy/greedy and non capturing group

Vote

0

Regular Expression
pcre

/
(?<First>\w+?) (?# First word UNGREEDY) (?> (?# Second group - see it is optional) (?>_) (?# But if it exists, must start with "_" NON CAPTURING GROUP ) (?<Second>\w+) (?# Snd then there should be a word - at least one char) )* (?# remember - the group is optional) \b (?# All the puttern must finish with word boundary)
/
gmx

Description

Loading markdown...
Submitted by anonymous - a year ago