From Daring Fireball, How to make Google’s ‘Web’ view your search default:
The trick is to append &udm=14 to the end of your Google search URL.
Can you perform the trick with StopTheMadness Pro? Yes! Use the redirects feature. In this case, some gnarly regex is required.
Pattern:
/^https://www\.google\.com/search\?((?!&udm=[0-9]).)+$/
Replacement:
$&&udm=14
I'll explain the technical details below, but if you don't care about those, then just plug the given values in StopTheMadness Pro and enjoy the "old style" Google Search!
StopTheMadness Pro uses the JavaScript function String.replace() to redirect URLs. In the URL matching pattern, the / characters at the beginning and end indicate regex. The ^ character matches the beginning of a string, and the $ character matches the end of a string. Regex treats some characters as special, such as the period and question mark, so those characters have to be escaped with a backslash \ to be treated as a literal period or question mark. So most of the above regex pattern is simply matching the https://www.google.com/search? prefix of the Google Search URL.
Now we come to the fun bits. The + character matches one or more instances of the previous pattern. We put a pattern in parentheses to form a group. Inside the parentheses is another set of parentheses:
(?!&udm=[0-9])
The ?! characters at the beginning indicate a regex negative lookahead, which means don't match the expression. We don't want to match a URL that already contains a &udm= value, because otherwise we could get caught in an infinite redirect loop, adding &udm=14 to URLs that already contain it!
In brackets, [0-9] indicates a range of characters, the numerical digits zero through nine. We want to match &udm= parameters with a value but not empty parameters.
The unescaped . character matches any character. Thus, the + after the group means that we match one or more instances of any character, all the way to the end of the URL ($), as long as the URL doesn't contain a non-empty &udm= already.
As for the replacement, the $& at the beginning is a special pattern that inserts the entire matched string, in other words, the Google Search URL. And then &udm=14 is appended to the URL.
The methods here are ugly, but the search results are beautiful.
My regex has been modified slightly to replace (?!&udm=) with (?!&udm=14), because some Google Search URLs had an empty &udm=, causing the regex to not match.
My regex has again been modified slightly to replace (?!&udm=14) with (?!&udm=[0-9]), because Google Image Search has &udm=2, causing the regex to not match. Regex is hard, y'all!