Regular Expressions 101

Community Library

Community Library Entry

8

Regular ExpressionOpen Workspace

/
((?:(?(?=(e.g.|z.b.|Figs?\.|\d+\.\d))\2|[^.!?])+[.!?]))
/
gi

Description
Created·2014-05-29 17:30
Type·Match
Flavor·PCRE (Legacy)

Grabs sentences including terms like: e.g. z.b. Figs.These get caught in 1st capturing group.

Problem: how to only accept matching sentences which contain pattern \b\d+[a-z]{0,2}\b?

Submitted by light0
Open Workspace