Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Regex for article titles changes
I would like to format my article titles based on this writing model:
Macbeth, de William Shakespeare
In order to display this instead:
«Macbeth» de William Shakespeare
I use a regex but unfortunatly I can’t get the desired signs. None of these two samples work:
<txp:title trim="/(.*)(,)/" replace="«$1»" />
<txp:title trim="/(.*)(,)/" replace="\xAB$1\xBB" />
Could you tell me please how to accomplish such that kind of thing?
Demo: https://regex101.com/r/qkesDM/1
Last edited by Pat64 (2020-03-17 09:48:25)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Regex for article titles changes
Hi Patrick,
the first version is working for me on Pete’s demo server.
Offline
Re: Regex for article titles changes
Thank you lot Oleg!
I’m using a MAMP local server and, as often, we observe lot of differences with a real environment…
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Pages: 1