Extension talk:Replace Text/Archive 2018

Is there a way to search with back slashes (/) ?
For example, how would I search for the string "c:\" ? Kmacdowe (talk) 20:19, 29 January 2015 (UTC)


 * You actually have a forward slash in your section header. Anyway, I think you can do it by just escaping it with another backslash, like "\\". Yaron Koren (talk) 00:01, 30 January 2015 (UTC)

How to Use $1 replacer following by numbers?

 * What if I want to replace (\[\[|link=)2L\]\] to $12L]], with regex?
 * The extension assume $12 is the replacer, but I just want $1 to be the replacer. Boxsnake (talk) 04:01, 20 February 2015 (UTC)
 * Do not mind, I found the solution on my own. Leave this thread in case others with the same problem can benefit from this
 * Replace

(\[\[|link=)2L\]\]
 * With

${1}2L]]

Is there a way to replace with \n (newline)
Is there a way to use the ReplaceText extension to replace with the \n (newline) character? I get the literal '\n' as output every time I try to replace with \n. Yes, I have 'Use regular expressions' checked. Cmjohannes (talk) 03:20, 3 September 2015 (UTC)


 * Can't you just have a newline in the replacement string? That's why the text inputs are textareas instead of single-line inputs. Yaron Koren (talk) 12:53, 3 September 2015 (UTC)


 * That solves it. So what regex expressions will be evaluated in the replacement string? For example, why does $1 get evaluated as a regex "variable," but not evaluated as the literal '$1' string? Cmjohannes (talk) 15:38, 4 September 2015 (UTC)


 * I don't know - everything other than "\n", hopefully. I'm surprised that "\n" doesn't work when you check the "regex" box, but thankfully there's a backup for that one. Yaron Koren (talk) 15:59, 4 September 2015 (UTC)

Is there a way to find \n or .newline.?
I would like to find \]\]\n. The ReplaceText extension can find \]\] or the ReplaceText extension can find \n, but the only way I can find \]\]\n is to search \]\] followed by pressing enter in the 'Replace Text:' box. 'Use regular expressions' is checked, so why is white space being searched for? Also, \n\n cannot be found, when I know it exists. Is there some kind of hidden character at the end of line breaks on wiki pages? Cmjohannes (talk) 05:15, 5 September 2015 (UTC)


 * This seems like basically the same question as before - but yes, it could be that, instead of just "\n", it's "\r\n" or some such. Yaron Koren (talk) 13:12, 8 September 2015 (UTC)

Parameter $wgBotJobUserID
I replaced line 56 in SpecialReplacetext.php with these lines:

global $wgBotJobUserID; if (isset($wgBotJobUserID)) $replacement_params['user_id'] = $wgBotJobUserID; else $replacement_params['user_id'] = $this->getUser->getId;

This way you can define a $wgBotJobUserID (number, not name) in LocalSettings.php to hide all changes of the job.

--VolkoV (talk) 12:46, 8 October 2015 (UTC)


 * The idea makes sense, although - I assume you came up with the name "$wgBotJobUserID"? If it's specific to Replace Text, it should start with "$wgReplaceText" - "$wgReplaceTextUserID" might work. Although better yet, I would think, would be to have users set the username, not the ID, and then the code looks up the ID. Yaron Koren (talk) 14:19, 8 October 2015 (UTC)

Not here
Hi User:Yaron Koren, any particular reason why RT isn't available on this wiki? Thanks. --Elitre (WMF) (talk) 12:39, 22 February 2016 (UTC)