Jonathan Hurley created AMBARI-23745:
----------------------------------------

             Summary: Allow Multiple Regex Replacements On Upgrades
                 Key: AMBARI-23745
                 URL: https://issues.apache.org/jira/browse/AMBARI-23745
             Project: Ambari
          Issue Type: Task
    Affects Versions: 2.7.0
            Reporter: Jonathan Hurley
            Assignee: Jonathan Hurley
             Fix For: 2.7.0


When upgrading from one stack to another, the {{regex-replace}} key can be used 
to find and replace a block of text which matches a given regular expression. 
This works by finding the literal string matching the regex and turning this 
into a regular find/replace. 

For example: 
{code}
<regex-replace find="\d-foo-\d" replace=""/>
{code}

on

{code}
1-foo-1
2-foo-2
3-foo-3
{code}

Would produce:
{code}
2-foo-2
3-foo-3
{code}

In order to replace all of the possible matches, we can extend the XSD of 
{{RegexReplace}} to create multiple literal {{Replace}} instances for every 
match.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to