Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?<book>\S+)\s*(?<chapters>(?<from>[0-9]+)(\s*-\s*(?<to>[0-9]+))*)
/
gm

Description

Matthieu 2 - 14 Jean 2-10 Apocalypse 12-22 Genèse 1- 10 Nombres 1- 10 Luc 1

Submitted by Jean-jacques AKAKPO - 4 years ago