Hi Kenneth
In addition to the issue we have been discussing I have hit further odd behaviour on another Find & Replace using regular expressions.
In this case I am looking to replace all occurences of a question mark with double quotes when the question mark immediately follows a digit.
The code in this case is as follows:-
[vba]
With L_Regex
.Global = True
.IgnoreCase = True
.Pattern = "\d\?"
For Each cl In Columns(G_SupplierDescriptionColumn).SpecialCells(2)
For Each m In .Execute(cl.Value2)
cl.Replace m, Replace(m, "?", "in")
Next m
Next cl
End With
[/vba]
When this code is run on a cell with the following contents:-
the code incorrectly produces the following updated cell contents:-Comes in two sizes: Small (fits 6?-7? Black only) Large (fits 7?-7.75? Black Red Navy Royal).
Instead the code should produce the following updated cell contents:-Comes in two sizes: Small (fits 6in-7inn Black only) Large (fits 7inn-7inn7inn? Black Red Navy Royal).
Have you any ideas why this is not working?Comes in two sizes: Small (fits 6in-7in Black only) Large (fits 7in-7.75in Black Red Navy Royal).
Thanks