Question about Rereplacer

Search
Other Pre-Sale questions
Forum

Question about Rereplacer

Pantelis's Avatar Pantelis
Hello
I want to ask if Rereplacer Pro can change a lot of HTML code at once. For example for the following code
<i class="fab fa-instagram " aria-hidden="true" title="instagram"></i>
<i class="fas fa-at" aria-hidden="true"></i>
<i class="fas fa-mobile-alt" aria-hidden="true"></i>
<i class="fab fa-whatsapp" aria-hidden="true"></i>
<i class="fab fa-viber" aria-hidden="true"></i>
<i class="ba-twitter-share-button zmdi zmdi-twitter" data-service="twitter"></i>
<i class="ba-facebook-share-button zmdi zmdi-facebook" data-service="facebook"></i>
<i class="ba-pinterest-share-button zmdi zmdi-pinterest" data-service="pinterest"></i>
<i class="ba-linkedin-share-button zmdi zmdi-linkedin" data-service="linkedin"></i>
<i class="ba-vk-share-button zmdi zmdi-vk" data-service="vk"></i>
<i class="ba-ok-share-button zmdi zmdi-odnoklassniki" data-service="ok"></i>
<i style="color:#ffffff" class="ba-zoom-in zmdi zmdi-zoom-in"></i>
<i class="ba-zoom-out disabled-item zmdi zmdi-fullscreen-exit" style="color:#ffffff"></i>
<i class="zmdi zmdi-share" style="color:#ffffff"></i>
<i class="ba-add-like zmdi zmdi-favorite" style="color:#ffffff"></i>
<i class="zmdi zmdi-fullscreen display-lightbox-fullscreen" style="color:#ffffff"></i>
<i class="ba-icon-close zmdi zmdi-close" style="color:#ffffff"></i>
<i class="ba-left-action zmdi zmdi-chevron-left" style="color:#ffffff; background-color:rgba(0,0,0,0)"></i><i class="ba-right-action zmdi zmdi-chevron-right" style="color:#ffffff; background-color:rgba(0,0,0,0)"></i>
<i class="zmdi zmdi-close albums-backdrop-close"></i>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
<i class="fa" aria-hidden="true"></i>
<i class="fas fa-map-marker" aria-hidden="true"></i>
<i class="fas fa-phone-alt" aria-hidden="true"></i>
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
<i class="fa" aria-hidden="true"></i>

I want to replace i with em
Thank you in advanced
Peter van Westen's Avatar Peter van Westen ADMIN
Yes, you can use Regular Expressions to replace stuff dynamically.
See: docs4.regularlabs.com/rereplacer/going-f.../regular-expressions
Please post a rating at the Joomla! Extensions Directory
Pantelis's Avatar Pantelis
Thank you for your answer but I am not familiar with REgular Expressions, where can I find help on how to syntax this in order to replace what I want?
Peter van Westen's Avatar Peter van Westen ADMIN
You can google on Regular Expressions.

I do not provide support on the free versions.
If you need further help, please purchase a subscription.
Please post a rating at the Joomla! Extensions Directory
Pantelis's Avatar Pantelis
I have purchased a subscription can you help me now?
Thank you in advanced
Peter van Westen's Avatar Peter van Westen ADMIN
So do you want to replace ALL <i> tags with <em> tags?
Or only those with classes or certain specific things?
And should the resulting <em> tags keep the same attributes (class, aria-hidden, etc)?
Please post a rating at the Joomla! Extensions Directory
Pantelis's Avatar Pantelis
I want to replace the following <i> tags with <em> and yes they should keep all
<i class="fab fa-instagram " aria-hidden="true" title="instagram"></i>
<i class="fas fa-at" aria-hidden="true"></i>
<i class="fas fa-mobile-alt" aria-hidden="true"></i>
<i class="fab fa-whatsapp" aria-hidden="true"></i>
<i class="fab fa-viber" aria-hidden="true"></i>
<i class="ba-twitter-share-button zmdi zmdi-twitter" data-service="twitter"></i>
<i class="ba-facebook-share-button zmdi zmdi-facebook" data-service="facebook"></i>
<i class="ba-pinterest-share-button zmdi zmdi-pinterest" data-service="pinterest"></i>
<i class="ba-linkedin-share-button zmdi zmdi-linkedin" data-service="linkedin"></i>
<i class="ba-vk-share-button zmdi zmdi-vk" data-service="vk"></i>
<i class="ba-ok-share-button zmdi zmdi-odnoklassniki" data-service="ok"></i>
<i style="color:#ffffff" class="ba-zoom-in zmdi zmdi-zoom-in"></i>
<i class="ba-zoom-out disabled-item zmdi zmdi-fullscreen-exit" style="color:#ffffff"></i>
<i class="zmdi zmdi-share" style="color:#ffffff"></i>
<i class="ba-add-like zmdi zmdi-favorite" style="color:#ffffff"></i>
<i class="zmdi zmdi-fullscreen display-lightbox-fullscreen" style="color:#ffffff"></i>
<i class="ba-icon-close zmdi zmdi-close" style="color:#ffffff"></i>
<i class="ba-left-action zmdi zmdi-chevron-left" style="color:#ffffff; background-color:rgba(0,0,0,0)"></i><i class="ba-right-action zmdi zmdi-chevron-right" style="color:#ffffff; background-color:rgba(0,0,0,0)"></i>
<i class="zmdi zmdi-close albums-backdrop-close"></i>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
<i class="fa" aria-hidden="true"></i>
<i class="fas fa-map-marker" aria-hidden="true"></i>
<i class="fas fa-phone-alt" aria-hidden="true"></i>
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
<i class="fa" aria-hidden="true"></i>
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, but are there any common things that you want to replace? Or do you want to list all of those individually?

For instance:
- all <i> tags with a class starting with fa, fas or ba, that do not have anything inside the tag itself.

And should the resulting <em> tags keep the same attributes (class, aria-hidden, etc)?
So should:
<i class="fab fa-instagram " aria-hidden="true" title="instagram"></i>
be replaced with this?
<em class="fab fa-instagram " aria-hidden="true" title="instagram"></em>
Please post a rating at the Joomla! Extensions Directory
Pantelis's Avatar Pantelis
List all of those individually like the example you make but not create one item for each
So should:
<i class="fab fa-instagram " aria-hidden="true" title="instagram"></i>
be replaced with this?
<em class="fab fa-instagram " aria-hidden="true" title="instagram"></em>
Peter van Westen's Avatar Peter van Westen ADMIN
So you can use the Treat as List option.
You don't need Regular Expressions for that.

It is explained in the documentation:
docs4.regularlabs.com/rereplacer/the-bas...ultiple-replacements
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in