[ 
https://issues.apache.org/jira/browse/OLINGO-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13874639#comment-13874639
 ] 

Eugenio Lentini commented on OLINGO-125:
----------------------------------------

Hi Michael,
I have forgotten a part in the regex, it should be 
"\\$skiptoken=.*?(?=&)|\\$skiptoken=.+" in order to take into account both the 
address having &other_params and the address ending with the skiptoken, such as

BOOK_BLOCK?$skiptoken=1100&mod=8888
BOOK_BLOCK?$skiptoken=1100

Thanks for the attention.
Eugenio

> Regular expression issue in a scenario
> --------------------------------------
>
>                 Key: OLINGO-125
>                 URL: https://issues.apache.org/jira/browse/OLINGO-125
>             Project: Olingo
>          Issue Type: Bug
>          Components: MISC
>    Affects Versions: V2 1.1.0
>            Reporter: Eugenio Lentini
>            Assignee: Michael Bolz
>            Priority: Minor
>
> Hi,
> I have found an error in a regular expression in class
> org.apache.olingo.odata2.ref.processor.ListsProcessor.
> Basically
> .replaceAll("\\$skiptoken=.+?&?", "") 
> should be replaced with 
> .replaceAll("\\$skiptoken=.*?(?=&)", "")
> otherwise what I get after 3 iterations is:
> BOOK_BLOCK?$skiptoken=100
> BOOK_BLOCK?00&$skiptoken=300
> BOOK_BLOCK?00&00&$skiptoken=300
> basically the regex recognize just the first character and not all the 
> character till the & symbol.
> Thanks a lot for your attention.
> Eugenio



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to