IgniteEngine-iOS icon indicating copy to clipboard operation
IgniteEngine-iOS copied to clipboard

Add .replace eval util

Open brandonscript opened this issue 10 years ago • 0 comments

For a regular expression replace, would be:

[[control.attribute:replace(/regularexpression/*modfiers*|replacement)]]

We may need to have the delimiters be dynamic, like so (pseudocode):

  • Identify the first character
  • Search for the next occurrence of that character NOT preceded by a backslash
  • Everything in between that start and end delimiter should be considered part of the regular expression
  • Characters after the delimiter but before the | separator are modifiers: i (case insensitive), g (replace all occurrences of the match).

brandonscript avatar Mar 13 '15 04:03 brandonscript