Open dazavala opened 4 years ago
I wonder if this is already resolved.
Regular expressions are not currently supported. The closest is that we match and replace substrings in the per-class direct string updates.
Per @dazavala, this can be deferred.
A string that requires replacement may appear in different contexts within a source, wherein some contexts the string must be transformed and in others the string must remain intact. Currently, the only way to configure the transformer to match a string that appears in different contexts is to declare, within the transformer metadata properties, the longest possible string which includes part of the context. For example, in the following XML stanzas the string "javax.jms" must transform within the creates.ObjectClass element, only.
To configure the desired transformation today I would declare property
"javax.jms.Queue,javax.jms.Destination"="jakarta.jms.Queue,jakarta.jms.Destination"
in the transformation metadata. This approach becomes tedious when string "javax.jms" appears frequently in different contexts throughout a source.It would be preferable to declare a regular expression on the left-hand side of a transform metadata property that matches "javax.jms" whenever the string follows the
"
or,
characters; or, does not match the string whenever it follows a.
character.