parse static method

Implementation

static StackoverflowQuestionUrl? parse(String url) {
  var matches = RegExp(
          r'^(?:https?:)?\/\/(?:www\.)?stackoverflow\.com\/questions\/(?<id>[0-9]+)\/(?<title>[A-z0-9-_.]+)\/?$')
      .allMatches(url);
  var id = matches.getValue("id");
  var title = matches.getValue("title");
  if (id == null) return null;
  return StackoverflowQuestionUrl._(id, title);
}