View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jeremy Gollehon[_2_] Jeremy Gollehon[_2_] is offline
external usenet poster
 
Posts: 35
Default Test for exact match in string

OK, so after writing this question I thought of at least one answer, replace
the tag identifiers with spaces. This might not be the most elegant
solution, but it works.

If you've got something better, I'd love to see it. Thanks.

Sub tester()

sTest3 = "<bhere's</b the stuff you wanted. "
sTest3 = Replace(sTest3, "", " ")
sTest3 = Replace(sTest3, "<", " ")
vSplit = Split(sTest3, " here's ")
bExactMatch = UBound(vSplit) < 0
Debug.Print "Test3: " & bExactMatch

End Sub

<snip