ReReplacer

search for wildcard numbers

3 months 2 weeks ago #89820

Daniel McDonald's Avatar Daniel McDonald

Hi,

i want to <link rel="canonical" href=" mydomain.com/blog?start={(*) }"> replace this with

<link rel="canonical" href=" mydomain.com/blog ">

How can i do that? wildcard search?

3 months 2 weeks ago #89821

Peter van Westen's Avatar Peter van Westen Admin

3 months 2 weeks ago #89829

Daniel McDonald's Avatar Daniel McDonald

Hi Peter, thank you very much, i tried with this Docs but didn't understand.
random:0-100 this is not want i need, the Numbers are fix and must stay like it.
i really didn't understand (*?) and {}. Can you kindly explain?

3 months 2 weeks ago #89831

Peter van Westen's Avatar Peter van Westen Admin

That part in the documentation explains the basic concept of Regular Expressions. I didn't mean you need the random:0-100 thing.

Anyway, you will need to use the Regular Expressions option.
Then try this in the search:

<link rel="canonical" href="([^"]*/blog)?start=[^"]*)">
And replace:
<link rel="canonical" href="\1">

A bit of explanation:
[^"] = any character except double quote
[^"]* = above 0 or more times
([^"]*/blog) = capture above followed by /blog. Which can then be referenced in the replacement with \1

3 months 2 weeks ago #89839

Daniel McDonald's Avatar Daniel McDonald

Hi thank you.
Your example didn't worked for me. I turned on/off Regular E... i tried an hour but nothing.
Then i inserted URLs with ,,,,, seperated.

Thank you for your help anyways.

3 months 2 weeks ago #89840

Peter van Westen's Avatar Peter van Westen Admin

What is the Search Area set to?

3 months 2 weeks ago #89852

Daniel McDonald's Avatar Daniel McDonald

Peter van Westen wrote:

What is the Search Area set to?
i was set to head area.

3 months 2 weeks ago #89854

Peter van Westen's Avatar Peter van Westen Admin

Can you give me (super) admin so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Hidden text' button in the forum editor to hide the confidential information.