Hello,

I am new to VBA and macros and I have encountered some issues with replacing strings using regular expressions.
Basically, I want to find a "number" and "space"/"no space" and "unit" (litres) and replace the space with non-breaking space (or add it if there is no space).
I need this to ignore the cases where the number is not followed by a single "l" (e.g. 5 long drinks).

I used the recording tool and came up with something like this:
Sub ReplaceLitres()
'
' nbsp between number and unit (l)
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        ' looking for a number, zero or one space followed by a single "l" and a dot, comma or end of paragraph.
        .Text = "([0-9])([ \?])(l[ \.\,^10^13])"
        .Replacement.Text = "\1^s\2\3"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = True
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
       
End Sub
But this code does not seems to work. Is the whole regex incorrect? Can someone please point me in the right direction?

Thank you very much for any answer.