Regex for string with symbols, digits and letters

Hello - Would anyone know the best way to use regex to extract the following order number?

String is Order Number: 77-y-32128-4 and I need to extract 77-y-32128-4

Hi @Bob2
use this regex pattern

(?<=Order Number:).*

1 Like


Another solution:

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Order Number:\s*)[-\dA-Za-z]+").Value


1 Like

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