Regular Expressions 101

Community Patterns

Leaflet tag ID matcher

0

Regular Expression
PCRE (PHP <7.3)

/
(?:leaflet|mapbox)[\w\-\._]*(?:-script)?
/
g

Description

Regex (to be) used to identify ID of the <script> tag that loaded Leaflet (or Mapbox).

Submitted by cebence - 10 years ago