Tuesday, February 15, 2011

Code to do a simple regex extraction


I like about the above:

  • one line does the match and one line does the extraction of the match and the conversion to the target type
  • to me, it reads clearly
  • it seems like a good use of “var” because I don’t care much that “reg” is a GroupCollection

No comments:

Post a Comment