Saltar navegación

[Resuelto] Is there a way to alter the output of a post using Regular Expressions?

This support ticket is created 4 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Minesh 4 years, 3 months ago.

Asistido por: Minesh.

Autor
Mensajes
#2311759

Tell us what you are trying to do?
Changing the Output of a post. I have a Regex pattern that changes the spelling of a word to an idiom.
It's an old Joomla-Site, the plugin who does is is not compatible with PHP8. I want to use WordPress in future.
Is there any documentation that you are following?
Is there any?
Is there a similar example that we can see?
Example expressions:
~ie~ ==> e
~ia~ ==> ja
~io~ ==> jo
~ei~ ==> ai

#2311873

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no such native feature to implement regular expression on your content, you will have to write your own custom shortcode that does the replacement work as per your requirement and return your desired content.

Here is the guide about how you can write custom shortcode:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/how-to-create-a-custom-shortcode/