Regular expression-like pattern matching on IEnumerable instead of string chars in C#
I am trying to modify a list of CIL code instructions in C#. Common tasks include finding groups or patterns of instructions and replacing them with other instructions while reusing some of the information from the original match. That sounds a lot like regular expressions except that my use case is on lists of instances a specific type instead of characters in a string. I can write some basic code to search and match stuff and replace it but I wonder if there is a more general approach with regexp syntax like “x?” or “(a|b)+” or “(a+)b*(c+)” but with a, b, c not being characters but instances
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.