so basically i have these types of strings
and i would like to replaces the firsts numbers to appear, unfortunately they sometimes come in hundreds decimals or uniques. Here is the code and the patterns that i tried using.
Sub Validator()
Dim r As Range
Dim s As String
Dim news As String
Dim regex As New RegExp
Dim regex2 As New RegExp
regex.Global = True
regex.Pattern = ",[\s\S]*$"
regex2.Pattern = "(^|\\s)([0-9]+)($|\\s)"
Sheet1.Activate
For Each r In Range("B1:B17")
s = r.Value
news = regex2.Replace(s, " ")
r.Value = news
Next r
End Sub
Please ignore pattern 1 he basically takes out everythign after the comma and it is succesful the problem is pattern 2 which is doing basically nothing when i execute my code and i know the code is functional because the first one came out correctly.
A3 Sport 1.8 16V TFSI S-tronic 3p
A3 Sedan Prestige Plus 1.4 TFSI Flex Tip
TT 1.8 TB 180cv
Should be the end results


