<gallery>[[File:foo.jpg</gallery> → <gallery>File:foo.jpg</gallery> [[https://en.wikipedia.org/w/index.php?title=Geography_of_Saint_Kitts_and_Nevis&diff=520233843&oldid=520088437 Example]] @Magioladitis 08:09, 28 October 2012 (UTC)
Description
Description
Event Timeline
Comment Actions
@TMg 12:43, 11 May 2014 (UTC) wrote:
I just added these two regex to my tool. They are applied only to the contents of gallery tags.
- Replace: '^(\\s*)\\[+([^[\\]]*)\\]\\]?\s*$' (RegexOptions.Multiline) with '$1$2'
- Replace: '^(\\s*)\\[+' (RegexOptions.Multiline) with '$1'
This is my test case:
<gallery>[[File:1.jpg|1]] [[File:2.jpg|2 [[File:3.jpg|[[Valid]]</gallery>
Expected result:
<gallery>File:1.jpg|1 File:2.jpg|2 File:3.jpg|[[Valid]]</gallery>