RegExpParser
is typically used in the XML Renderer Framework, but can be invoked programmatically
as in the following examples which evaluate to null (match failed), "simple" and "sample" respectively:
caplin.element.parser.RegExpParser.parse("simple", {match:"z"})
caplin.element.parser.RegExpParser.parse("simple", {match:"i"})
caplin.element.parser.RegExpParser.parse("simple", {match:"i", replace:"a"})
Attributes | Name and Description |
---|---|
|
caplin.element.parser.RegExpParser()
|
Attributes | Name and Description |
---|---|
|
String
parse(Variant vValue, Map mAttributes)
Transforms a string against a standard JavaScript regular expression. |
►
caplin.element.parser.RegExpParser()
►
String
parse(Variant vValue, Map mAttributes)
Transforms a string against a standard JavaScript regular expression.
If the string matches, then the function replaces the matched part with the replace expression, otherwise the function return null.Variant | vValue | the string to parse. |
Map | mAttributes | a list of attributes, as specified in caplin.element.formatter.RegExpFormatter. |