[
http://jira.magnolia-cms.com/browse/MAGNOLIA-2659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21685#action_21685
]
Manuel Molaschi commented on MAGNOLIA-2659:
-------------------------------------------
I have a regexp with pattern
/((prefix1)|(prefix2)|......|(prefixN))/(.*)(/(.*))?
which ends to
redirect:http://..../$28?....$n...$m
Suppose that matching group n° 2 is "XXX" and n° 28 is "YYY"
with actual code $2 is replaced before replacing $28 and then the result is
redirect:http://..../XXX8?....$n...$m
insteadof
redirect:http://..../YYY?....$n...$m
> info.magnolia.cms.beans.config.RegexpVirtualURIMapping error with high number
> of groups
> ---------------------------------------------------------------------------------------
>
> Key: MAGNOLIA-2659
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2659
> Project: Magnolia
> Issue Type: Bug
> Components: core
> Reporter: Manuel Molaschi
> Assignee: Philipp Bracher
>
> I found that using a regexp with a high number of groups (>10) in a
> RegexpVirtualURIMapping can cause a problem when replacing group instances
> with matches.
> if you change
> int matcherCount = matcher.groupCount();
> for (int j = 0; j <= matcherCount; j++) {
> in
> int matcherCount = matcher.groupCount();
> for (int j = matcherCount; j >= 0; j--){
> it works.
> This problem happens because the procedure replaces (in example) all "$2"
> occurrences making impossible to find (and replace) the "$20"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------