You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#108952 regex : change all "text links" of an article by "blabla" or whatever

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by woluweb on Friday, 01 October 2021 13:59 BST

woluweb
Hi, I wanted to use the regex functionality of JCE to make a search/replace. The goal is to change all the "link texts" of hyperlinks by some other text (in my example by "click here") :

<a href="https://www.joomlacontenteditor.net/url1">link text</a>
<a href="https://www.joomlacontenteditor.net/ur2l">another</a>
<a href="https://www.joomlacontenteditor.net/url3">yet another</a>
On any regex tool the following would work : replace

(\<a[^>]*>)(?<url_text>[^>]*)(<\/a>)
by

$1 here $3
But JCE does not take placeholders ($1, ...). So how can I do in JCE for what I thought to be a "simple" remplacement? Txs! Marc

Ryan
Please try JCE Pro 2.9.17 Beta - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Clear your browser cache after install.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

woluweb
Hi Ryan,

Excellent, this works just fine now :)
Txs a lllot for this.

I have published the tip on the Joomla forum on which I am most active:
https://forum.joomla.fr/forum/joomla-3-x/questions--g%C3%A9n%C3%A9rales/2031858-expressions-r%C3%A9guli%C3%A8res-regex-dans-l-%C3%A9diteur-jce

woluweb
https://www.woluweb.be/images/jce-regex.gif