I am trying to match a group in a regular expression, but I do not want this group to be the end result.
For instance:
((kl(\.)?|at)? ([0-1][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?)
Running the above expression on at 12:25should return 12:25.
Is there any way to do this?
I tried using:
(?:((kl(\.)?|at)? )([0-1][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?)
But there is no difference.
Then i tried
(?<!(?:((kl(\.)?|at)? )([0-1][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?)
But this returned an empty result.
I use an expression in C #.
source
share