Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
.*[a-z\-0-9]+\-([0-9]+).*
/

Description

Used to get a value from a class e.g.: [...] class="font-12"[...] This regEx will receive "12" given the content of the class

Submitted by Gabriel R. Sezefredo - 10 years ago