I am trying to extract the string <Num> from within Barcode(_<Num>_).PDF using Regex. I am looking at Regular Expression Language - Quick Reference but it is not easy. Thanks for any help.
Dim pattern As String = "^Barcode(_+_)\.pdf"
If Regex.IsMatch("Barcode(_abc123_).pdf", pattern) Then
Debug.Print("match")
End If
\dbefore the+otherwise you are just matching underscoresBarcode_123_.pdf? Or something else?Barcode(_abc123_).pdf; could be numbers or string; I want theabc123