Tuesday, 10 September 2013

Regex matches incorrect value

Regex matches incorrect value

I am using C#. I need regex to examine text like that:
abc {val2:123} lorem ipsum {val1:234}
I need to match all the {x:y}. I've tried regex {.*} but it matches the
whole value - "{val2:123} lorem ipsum {val1:234}". Of course It's not fun.
How to change my regex approppriately?

No comments:

Post a Comment