Topic on Project:Support desk

Jump to navigation Jump to search

replace with brackets in output

3
Summary by Vicarage

Install pageforms extension and do

{{#arraymap:{{{Authors|}}}|,|x|[[x]]}}

Vicarage (talkcontribs)

<nowiki>I want to convert "Hello, There" to 2 links Hello, there, but neither

[[{{#rreplace:Hello, there|,|]],[[}}]]

nor

[[{{#rreplace:Hello, there|(.*),(.*)|$1]],[[$2}}]]

work, and I can't find a way of escaping the brackets in the result <nowiki>


See also http://fanbase.johnbray.org.uk/Sandbox

Jonathan3 (talkcontribs)
Vicarage (talkcontribs)

My actual use case was splitting up lists of authors, which is exactly arraymap's first example, so the solution could not be easier! Thanks very much