Jump to content

User:DemonDays64 Bot/New RegEx

From Wikipedia, the free encyclopedia

TEST 1: Using ((?<=(?<!\?)url ?= ?)|(?<=\[)|(?<=<ref>))(http:\/\/)?(www\.)?example\.com(?!\.) to find, and https://$3example.com to replace. New at this still, so not sure that this'll work (especially with JWB).

TEST 2: Changed to (http:\/\/)?(www\.)?example\.com(?!\.) and https://$2example.com due to realization that this was too complex for testing.

Success with test 2!!!!!!!!!!!! I realized that I had not turned on RegEx in JWB lol

TEST 3: Full code now. Testing finding with ((?<=(?<!\?)url ?= ?)|(?<=\[)|(?<=<ref>))(http:\/\/)?(www\.)?example\.com(?!\.) and replacing with https://$3example.com and planning to make a new bot request after this works.

Success of Test 3! Ready to request (just to have a review of the code again). I'm a bot; please see my operator's talk page and tell them that they're using the wrong account, probably. 04:28, 30 December 2019 (UTC)