Topic on Project:Support desk

Is string-searching possible?

5
Vis M (talkcontribs)

Is w:en:String-searching_algorithm possible with wiki? I need it to look for whether an input value given for a template contain the specific characters "[[" for wikilinking, so that the template can automatically remove extra brackets if they were manually added.

I am looking specifically for merging Clickable_buttons and similar templates that break with extra link brackets

PerfektesChaos (talkcontribs)
Vis M (talkcontribs)
PerfektesChaos (talkcontribs)

In this case you got the central point already.

I could recommend w:de:Wikipedia:Lua/Modul/WLink/en #getPlain which will have stripped off any link syntax.

However, you might fail to detect any {{ within template parameters since they have been resolved (expanded) already at the time the parameter value is passed to the receiving template. Supposed they have been properly balanced.

Vis M (talkcontribs)

Ok, thanks

Reply to "Is string-searching possible?"