You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we can't make use of the way duplex shields in the mapbox streets data are designed to be styled, because we can't use regex as part of values, and we also don't accept \n as a space for line wrapping. Is it feasible to implement the ability to use find/replace and \n?
As of #5434, expressions (the successor to functions) can be used as filters. #4089 tracks adding an expression operator for testing whether a string matches a regular expression, but we can leave this issue open to track adding an expression operator for finding and replacing occurrences of a substring or regular expression match within a given string.
Activity
lucaswoj commentedon Feb 1, 2017
From @1ec5 on August 3, 2015 23:48
The regex half of this is covered by #233.
lucaswoj commentedon Feb 1, 2017
From @jfirebaugh on August 4, 2015 0:53
#233 is for the use of regexes in filters, which is a different use case.
I seem to recall an issue for wrapping on newlines, but I can't find it at the moment.
lucaswoj commentedon Feb 1, 2017
We have a separate issue for regex support and have already implemented newline support.
lucaswoj commentedon Feb 1, 2017
From @jfirebaugh on December 22, 2016 18:25
As noted above: the other issue is for regex support in filters. This is about regex support in functions.
1ec5 commentedon Oct 26, 2017
As of #5434, expressions (the successor to functions) can be used as filters. #4089 tracks adding an expression operator for testing whether a string matches a regular expression, but we can leave this issue open to track adding an expression operator for finding and replacing occurrences of a substring or regular expression match within a given string.
[-]Allow use of find/replace regex to compute property values[/-][+]Add find-and-replace expression operator[/+]stevage commentedon Jan 21, 2024
Currently you can kind of workaround find-and-replace without regex, but it's pretty clunky:
This would certainly improve the ergonomics of that.