Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The pattern [0-9a-zA-Z-] in fromUri means "any single character in the range of 0-9 or a-z or A-Z or the character - literally". The plus character makes this a greedy pattern that matches one or more of the preceding token, and will match as many characters as possible before satisfying the next token. By enclosing the pattern in parentheses we create a capturing group ([0-9a-zA-Z-]+) which can be referenced in the toUri using $1.

...