As a .Net developer I’m almost addicted to regular expressions to solve common string problems. The advantage of regex is that a lot of tools and languages use them. A drawback is that regex can be very complex and hard to read (documenting them is key). Another drawback is that every language has its own implementation / dialect.
Groups are captured by columns, but are not explicitly named. When regex replacement is used, the engine will match the $n to the n-th group. You can reuse the group in the regex itself by adding /1/ to the regex.
About the Author
Hi! I'm Kees. Thanks for checking out my Blog. I work as a .Net Engineer for one of the biggest web-shops in the Netherlands: wehkamp. I ❤️ C# and I like to solve nifty problems.Learn more