Extract Snippet regex for easier testing