I will be reading in a text file, creating an array and need to remove the span tags, leaving the text string in between. Basically the line might look like this:
Some text here and I want to just be left with the string “Some text here”.
I know I can remove the end tag by replacing “” with “”, but the beginning tag is a bit more than I’ve done with RegEx. I thought I could use something like:
rg.searchPattern = "<span(.+)>"
for i = 0 to ubound(myArray)
myMatch = rg.search(myArray(i))
if myMatch <> nil then
myArray(i) = replace(myArray(i),rg.searchPattern,"")
to get rid of the first half of the span tag, but it’s not working. I’m still getting the complete span tag along with the text string. I’ve also tried other combinations.