regex - Capturing string into multiple properties with Ant -
I need to map the standard ivy dependency tag to my three properties (org, name, rev).
& lt ;! - & amp; Dependency \ s + org = "([^" +) "\ s + name =" ([^ "] +)" \ s + revenue = "([^"] +) "* /> -. Gt; & lt; regexp id = "ivyPattern" pattern = "& amp; Lt; Dependency \ s + organ = & amp; Quot; ([^ & Amp; quot;] +) & amp; Quot; \ S + name = & amp; Quot; ([^ & Amp; quot;] +) & amp; Quot; \ S + Revenue = & amp; Quot; ([^ & Amp; quot;] +) & amp; Quot; *. / & Amp; Gt; "/> Target name =" Capture "depends =" Ivy cadence "> propertyregex Selects casesensitive = "false" regexp = "ivyPattern" input = "$ {dependency}" = "\ 1" property = "organ" /> gt; propertyregex casesensitive = "incorrect" regexp = "ivyPattern" input Select = "$ {Dependency}" Select = "\ 2" property = "name" /> gt; propertyregex casesensitive = "false" regexp = "ivyPattern" input = "$ {dependency}" = "\ 3 "attribute =" resurgence "and & lt; resonate me ssage =" dependency: $ {dependency} "/>
Test result:
[echo] dependency: [echo] Organization: $ {org} [echo] Name: $ {name} [echo] Rev: $ {Revenue} creation successful
XML-Excluded You can see, I have an online resource (freeformatter.com) using patterns
Why is not this working? Each Reggae tester says that the (unchanged) pattern works very well!
The following modified code works:
& lt; Propertyregex caseensitive = "false" input = "$ {dependency}" select = "\ 1" attribute = "org" & gt; & Lt; Regexp refid = "ivyPattern" /> & Lt; / Propertyregex & gt; & Lt; Propertyregex caseensitive = "false" input = "$ {dependency}" select = "\ 2" property = "name" & gt; & Lt; Regexp refid = "ivyPattern" /> & Lt; / Propertyregex & gt; & Lt; Propertyregex caseensitive = "false" input = "$ {dependency}" select = "\ 3" attribute = "resurgence" & gt; & Lt; Regexp refid = "ivyPattern" /> & Lt; / Propertyregex & gt; In a refid
attribute
regexp
tag, a declared regex Should be referred
Comments
Post a Comment