Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(?:.*\\)?(?:.+\.)?(.+)(?<!\.min)(?:(\.min)?\.js)$
/
gm

Description

Extracts the culture name from a javascript file. Works with minified and non minified files.

Submitted by Lucas Martin - 9 years ago