Hi Regex gurus of this site, i have an issue trying to write regex which return first part of message till first match. I'm programming in C# language and using parameters (?is)
My current regex is: :(?<Tag>[0-9]{1,}[a-z]{0,}):(?<Value>.*?)(?=:75)
My sample string is:
:20:gtregeeg.::()(*&(*&(ERW
:70:fdaksjfdjkahfdkahkdahjkdafda+++----
- :20:aslfkjdklasjdlsafjkdsaf.\[[][^%$#%*$^#(
:75: asdfasdfsasfd812349798759*&)(*)((_
.5697.dsaasdfasfa()()(2435325&^&*&()*
:79:afdfdasfdas(*(&*(&)(__+-*-**--+
:75E:adfasf-++++***/*/-/-*/*++...
:20:dafsdfadfasd_+_+)((*&&^*
:75:sdafassfafdfadsafdadfaaf204392-395(**(&(&()*)
:::.....------------+-**--
How to match everything till first tag match :75:
because if there are more tags in string text it continues to match. I need to match only till first found tag :75:
and i don't care what follows up next. Tried to search this site for particular solution and what tried nothing helped i got the same answer that if tag occurs further in text it still matches. Thanks for help.