Wikipedia talk:AutoWikiBrowser/Find and replace
This is the talk page for Wikipedia:AutoWikiBrowser/Find and replace This is a good place to ask for help with find and replace operation in AWB, to discuss Wikipedia:AutoWikiBrowser/Find and replace or AWB's find and replace functionality. |
Index
|
|
|
Ignore "|url=" and "|title=" of citation templates?
editFind and replace offers one the ability to ignore the entirety of "templates, refs, link targets, and headings", however, I wanted to know if it was possible to only ignore the not-to-be-changed parameters in citation templates (|url= and |title= as prime examples), but still change interwiki link targets, also within citation templates (e.g. in the |website= parameter). Lordtobi (✉) 14:11, 25 February 2018 (UTC)
I have a table with 'Find', and 'Replace with' fields, is there a way to import this into 'AutoWikiBrowser'?
editHi all, I have a table with 'Find', and 'Replace with' fields, is there a way to import this into 'AutoWikiBrowser'? Best regards DynamoDegsy (talk) 13:21, 16 March 2018 (UTC)
- Not easily. You can save your settings in an XML file. You can try by adding one of your entries and saving it, then looking at that XML file. If you think you can convert your table to that format, you're set. There are no tools that I know of that can do this. Walter Görlitz (talk) 14:31, 16 March 2018 (UTC)
- I came here looking for an answer to the same issue - a govt website had changed the unique page identifier that affected ~2,000 articles. I used the method Walter Görlitz suggested, so thanks for that, although the process was easier than I feared. The code will depend on the particular settings you have used, but to replace aaaa with bbbb will be along the lines of
1st block of code that repeats
aaaa2nd block of code that repeats
bbbb3rd block of code that repeats
. My table was in excel, so I simply added a column before, column in the middle & column after. Copied the 3 blocks of code down the table. Opened the XML file with notepad & pasted the 5 columns as plain text, making sure it included line breaks at all the appropriate points. Whilst it isn't perfect, those errors are a result of my settings rather than copying the table. Find bruce (talk) 03:31, 8 May 2019 (UTC)
- I came here looking for an answer to the same issue - a govt website had changed the unique page identifier that affected ~2,000 articles. I used the method Walter Görlitz suggested, so thanks for that, although the process was easier than I feared. The code will depend on the particular settings you have used, but to replace aaaa with bbbb will be along the lines of
Replace uppercase by lowercase
editHi,
Is is possible to replace a string in uppercase by the same in lowercase?
For the context, on Wikisource the OCR sometimes put all caps words who need to be convert in small caps (lowercase inside the template {{sc}}). I found the syntaxe ([A-Z])([A-Z]*) -> $1\L$2 online but it doesn't work :( Any idea?
Cdlt, VIGNERON * discut. 11:36, 3 February 2019 (UTC)
- I don't think changing case is possible in regex itself, but you can take advantage of magic words in the replace string. E.g.,
\b([A-Z]+)\b
→{{sc|{{subst:lc:$1}}}}
. SiBr4 (talk) 12:57, 3 February 2019 (UTC)- Apparently, some flavours (?) of regex have a \L that transforms into lowercase.
- Thanks your solution works perfectly !
- Cdlt, VIGNERON * discut. 13:16, 3 February 2019 (UTC)
Entering lists
editIs there any way to enter a list for changes without having to copy & paste every single entry? A lot of changes coming out of CFD require manual work (mainly on template entries) and it's so tedious & error prone to have to put every item in one by one. Timrollpickering (talk) 13:47, 29 May 2020 (UTC)
Stupid question
editWhat can be done with the advanced find and replace settings that cannot be done with the normal settings? Dawnseeker2000 21:56, 12 February 2021 (UTC)