How do I regex the output of a tag?

Hi All,

I want to manipulate the contents of <r:url /> using regex. I’m
wanting to do something like MovableType’s regex modifier for
variables[1]:
In MT-ese what I want to do is:
<mt:var tag=“pagepermalink”
regex_replace="/^(.+)/ja/(.*)/","$1/en/$2" />
To change eg:
http://example.site/ja/optional/path
into:
http://example.site/en/optional/path

How would I do this? Is there a way to write ruby code directly into
templates? Or am I looking at a custom Radius tag or making an
extension?

Thanks in advance!

peace - oli

[1]
http://www.movabletype.org/documentation/appendices/modifiers/regex-replace.html

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs