Hey, I need the regex to keep only first word characters. For example “text-yes” → “test” , or “test_yes” → “test”.
Thanks!
Hey, I need the regex to keep only first word characters. For example “text-yes” → “test” , or “test_yes” → “test”.
Thanks!
Yah like this in Regex
str_output = System.Text.RegularExpressions.Regex.Match(strinput.ToString,”.*(?=\W)”).ToString.Trim
Cheers @jadbenn
Hi,
Hope the following helps you.
System.Text.RegularExpressions.Regex.Match(strData,".*(?=[\W_])").Value
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.