0 Replies Latest reply on Mar 6, 2018 8:57 AM by Thomas Isaksen

    filter-ref/rewrite problem

    Thomas Isaksen Newbie



      I am trying to use a rewrite rule which by itself is working ok, however, I am not getting a value in my capture-group $1


      <filter-ref name="spring-rewrite" predicate="regex('^\/schema\/.*\/spring-((?!-).*)\w+.xsd$')" priority="99"/>


      Matching rewrite:


      <rewrite name="spring-rewrite" target="/schema/beans/spring-$1-4.3.xsd" redirect="true"/>


      In the above rewrite "$1" does not have a value so the redirect goes to "/schema/beans/spring-" and the rest is missing. It should contain the capture group value from the filter: spring-beans.xsd redirects to spring-beans-4.3.xsd


      Now, I haven't actually found any documentation on this so I am not sure if it's even supported to use the resulting capture group in the rewrite element.