Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function simpleCellRegex(Myrange As Range) As String
- Dim regEx As New RegExp
- Dim strPattern As String
- Dim strInput As String
- Dim strReplace As String
- Dim strOutput As String
- strPattern = "<a\b([^>""']|""[^""]*""|'[^']*')+\bclass=""changed-by"">.*?<\/a>"
- If strPattern <> "" Then
- strInput = Myrange.Value
- strReplace = ""
- With regEx
- .Global = True
- .MultiLine = True
- .IgnoreCase = False
- .Pattern = strPattern
- End With
- If regEx.Test(strInput) Then
- simpleCellRegex = regEx.Replace(strInput, strReplace)
- Else
- simpleCellRegex = "Not matched"
- End If
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement