K
K
kevus2018-04-25 09:47:22
Regular Expressions
kevus, 2018-04-25 09:47:22

What regex pattern would work here?

Greetings.
Regex.Replace(links[i],"\\?p=[\\d]{1,}\\?p","?p");
Captures ?p=1?p=2
AND turns it into ?p=2.
Please tell me how to adapt to this situation.
It was

?size=30&lang=ru&first=579&start=539?size=30&lang=ru&first=579&start=501

It became That
?size=30&lang=ru&first=579&start=501
is to remove the double
?size=30&lang=ru&first=579&start=539
Thank you very much.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick Sdk, 2018-04-25
@kevus

perhaps this option
or another option
but here you need to test on sharp (or whatever you have) :)
https://repl.it/repls/NastyIndianredProblems

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question