c# - How to rewrite a string by pattern -


I have a string where "special areas" are attached in a crisp brace:

  {IntIncG} / {intIncD} / 02- {yy}  

I need these through all these elements and they have to change based on their content. What is the best code structure to do in C #?

I can not just change one place because I need to know the indicator of each "special area {}" so that the value to change it correctly.

  reggax rgx = new reggae (@ "\ ({[^ \}] * \ }) "); String Output = RGX Replay (input, new matchualumer (dustfum)); Stable string DoStuff (match match) {// Here you have access to the match. Indexes, and matches Value can do something different for match 1, match 2, etc. // You can easily close the value by string. Value = match. Value Sebstring (1, match value.length -2); // Then call a function, which takes value and index to be the string to be subscribed}  

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -