I am upgrading my PHP scripts to use mysqli and it necessitates changing thousands of lines where the variables have exchanged position. For example:
mysql_query($query, $db)
now must become
mysqli_query($db, $query)
Is a regular expression the best way to quickly changes thousands of lines? If so, could someone help me create the regex in order to swap these? I've already changed the function calls for mysqli, but the function parameter swapping is beyond my find/replace skill.
I'm using Visual Studio 2015 find/replace.