Maybe ....
Option Explicit
Sub NotRegEx()
Dim oSlide As Slide
For Each oSlide In ActivePresentation.Slides
If Not oSlide.HasNotesPage Then GoTo NextSlide
With oSlide.NotesPage.Shapes(2)
If Not .HasTextFrame Then GoTo NextSlide
If Not .TextFrame.HasText Then GoTo NextSlide
If Len(.TextFrame.TextRange.Text) = 0 Then GoTo NextSlide
.TextFrame.TextRange.Text = DeleteTags(.TextFrame.TextRange.Text, "code1")
End With
NextSlide:
Next
End Sub
'only tag, function adds <s> and </s>
Function DeleteTags(s As String, t As String) As String
Dim sStart As String, sEnd As String
Dim iStart As Long, iEnd As Long
sStart = "<" & t & ">"
sEnd = "</" & t & ">"
iStart = InStr(1, s, sStart, vbTextCompare)
iEnd = InStr(1, s, sEnd, vbTextCompare)
Do While iStart > 0 And iEnd > 0
'start tag at beginning
If iStart = 1 Then
s = Right(s, Len(s) - iEnd - Len(sEnd) + 1)
Else
s = Left(s, iStart - 1) & Right(s, Len(s) - iEnd - Len(sEnd) + 1)
End If
iStart = InStr(1, s, sStart, vbTextCompare)
iEnd = InStr(1, s, sEnd, vbTextCompare)
Loop
DeleteTags = s
End Function