Test, validate and match regular expressions
This regex matches strings that start with either "leaflet" or "mapbox", followed by any combination of word characters, hyphens, underscores, and periods, and optionally ending with "-script". It is typically used in web development to identify HTML element IDs, class names, or script tags associated with Leaflet or Mapbox mapping libraries. This helps in tasks like DOM scraping, script detection, or asset management for map-based web applications.