Say I have a regex matching a hexadecimal 32 bit number:
([0-9a-fA-F]{1,8})
When I construct a regex where I need to match this multiple ti
Why not do something like this, not really shorter but a bit more maintainable.
String.Format("(?{0})\s*:\s*(?{0})", "[0-9a-zA-Z]{1,8}");
If you want more self documenting code i would assign the number regex string to a properly named const variable.