Topic on Project:Support desk

find every <file> or </file> and replace

4
JanTappenbeck (talkcontribs)

hi!

a old function did not work. so i create a new template.

is there a simple way to change in <file> => {{File| and </file> => }} in the hole database?

regards Jan

Jonathan3 (talkcontribs)

I think Extension:Replace Text could do that.

I've not tested this, but if you use the regex setting you could find

<file>(.*)<\/file>

and replace it with

{{file|$1}}
JanTappenbeck (talkcontribs)

hi !

i oben and the result will show

<file>(.*)<\/file>“ wird durch „{{file|$1}}“ in 250 Seiten ersetzt.
<file>(.*)<\/file>“ will replace „{{file|$1}}“ in 250 side.

But when i update a side with the old text there is no change!!!!

on special page "last changes" nothing will be listet - but the flag is set!

regards Jan

Jonathan3 (talkcontribs)

I don't understand all that but ReplaceText uses the job queue so it won't do all the replacements immediately. Run runJobs.php if you need it straight away. Also the extension only does 250 pages at a time so you might need to do the find/replace again (probably preferably after the first lot has finished). It's all on the extension's manual page :-)

Reply to "find every <file> or </file> and replace"