Template:Shared Draft 213

=Unsorted Notes= Things to learn and practice if possible:
 * Between Start Point and End Point, add Item immediately before/after Start Point or End Point (e.g.  to  )
 * Between Start Point and End Point, if Item B before Item A, switch around (e.g. )
 * Between Start Point and End Point, reorder selected items (e.g.  )
 * If article has specific items but lacks value X, tag (e.g. has navboxes but doesn't have Navigation header, )
 * If article has a string beginning with a specific value and ending with a specific value, tag, but stuff between doesn't matter (e.g. [[Category: to {{ )


 * Method for looking for level 2 headers that are not one of a set group

OH&S
Inept Wiki User

In terms of tasks I was trying to learn regex for, I would say the first and fifth items in the list ( https://toarumajutsunoindex.fandom.com/wiki/Message_Wall:OH%26S?threadId=4400000000000052314#4400000000000151634 ) were the ones which I had given higher priority in terms of both finding a way to do them and getting them done:


 * The objective of the first one (first bullet-point on the list) was to find a way to automatically add hideaddbutton=true to the end of gallery tops (e.g. or  to ).
 * The objective of the second one (fifth bullet-point on the list) was to find a way to locate instances where the square bracket item tagged at the end with TT51 (e.g. BlahBlahBlah  ) has File after the first set of brackets (i.e. [[File :, which would mean that the tag was after an image rather than a linked term) and switch the tag (TT51) to a different one (separating the tagged instances of images and linked terms).
 * Note: The original goal of the TT51 task was to find all instances of mid-paragraph images (the ones which were causing paragraph problems after the switch to the UCP). The identification sweeps were set to tag instances where a square closing bracket was it direct contact with a letter (which would happen with mid-paragraph images), however they also picked up instances of pluralized linked terms and the like (e.g. demon s).

OH&S

Ok. This is what I've got:

1. Find gallery tags (not in template parameter) with hideaddbutton=true: ...then if hideaddbutton=true isn't at the end, put it there using regex replace: 2. Find gallery tags (not in template parameter) without hideaddbutton=true: ...then add hideaddbutton=true at the end using regex replace: 3. Find instances where is next to a  rather than a link: ...then change to whatever you wish using a simple replace. e.g.

Inept


 * 1 and #2 tested in MassEdit and function well, #3 not working to switch only the (File:) ones in MassEdit
 * 1 & #2 done
 * Adaptation to #3 done

Links

 * w:c:dev:FindAndReplace
 * w:c:how-to:How_to_use_regular_expressions(regex)_for_pattern_matching
 * w:c:code:Regular_expression
 * 
 * 

June 2022
[a-z](?=\[\[+File:)

This is a test to locate instances where an image is present in the middle of a paragraph and a word, letter x or number 1[[File:Template Placeholder other.png are in contact with the opening square brackets.



Letter-Space-Frontal Square Brackets-File [a-z][ ](?=\[+File:)

Comma and full stop cases

=Other=
 * Using multiple SDs for regex sweep testbed (SD221-3)