Skip Navigation

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

This support ticket is created 3 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 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 3 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#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
Supporter

Languages: English (English )

Timezone: 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/