Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RegEx and complex pattern
Message
From
23/01/2019 09:25:23
 
General information
Forum:
C#
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01665645
Message ID:
01665675
Views:
47
Likes (1)
>>>I will not pretend I understand, but it does indeed work (for that test, at least).
>>
>>Well, regex always tries to find the longest match - that is why it went up to the second func
>>
>>I added a ? in the data group
>>
>>read about the quantifiers *?, +? and ?? https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference#quantifiers
>
>Thanks again and for the reference. I will also need to test more cases, because what if I have some nested XML (e.g sample of
>
><func>Some<func>Another</func>..</func>
>
>This is just a made up example, I need to look more into all current tests. I'll run all of them now just to see if there may be some fallout of that pattern change.
see also here https://docs.microsoft.com/en-us/dotnet/standard/base-types/quantifiers-in-regular-expressions
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform