Sub RemoveNumbersAndBrackets(inputString As String) As String
Dim outputString As String
Dim lines() As String
lines = Regex.Split("\n", inputString) ' Split inputString into an array of lines using regex
For Each line As String In lines
line = Regex.Replace("[\p{N}()\\\[\]]+", "", line) ' Remove numbers and brackets from the line
line = Regex.Replace("^[\.]+", "", line) ' Remove full stop from beginning of line (left when numbers are removed)
line = line.Trim
If line <> "" Then ' Check if the line is not blank
outputString = outputString & line & CRLF ' Append modified line to outputString
End If
Next
Return outputString.Trim
End Sub