Skip to content

Instantly share code, notes, and snippets.

Max Barraclough MaxBarraclough

Block or report user

Report or block MaxBarraclough

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
MaxBarraclough /
Created Jun 20, 2018
Amazon Lambda script: start all appropriately tagged instances
## Amazon Lambda script: start all appropriately tagged instances
## Runs in Amazon Lambda as Python 2.7 or as Python 3.6.
## Intended to be invoked on a schedule by Amazon Cloud Watch.
## Tag relevant instances with label 'autostart', value 'True'.
## TODO It could be good to add logging to this script
MaxBarraclough / regexOddness.cs
Last active May 19, 2017
Unexpected different behaviour when using parentheses in C# regex
View regexOddness.cs
System.Text.RegularExpressions.Regex separatorRegex1
= new System.Text.RegularExpressions.Regex("a");
System.Text.RegularExpressions.Regex separatorRegex2
= new System.Text.RegularExpressions.Regex("(a)");
string str = "a";
string[] split1 = separatorRegex1.Split(str); // { "", "" }
string[] split2 = separatorRegex2.Split(str); // { "", "a", "" }
You can’t perform that action at this time.