By using boundaries in regex can we extract?

Input:
Ticket#4261 IP Info Requested By Malle Veeranjaneeyulu On Thu Jun 08 2023 22:51:46
OutPut:
Malle Veeranjaneeyulu

Name is Dynamic…
need regex syntax to get the middel string between By and On in the Input…
By Using Split function can do…
But by using boundary values, can we extract??
if yes, please share the syntax in regex

Hi,

How about the following?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=\bBy ).*?(?= On\b)").Value

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.