Here's a better way that will remove any HTML tags, not the specific one that was coded in the previous script:
Greetings from Canada
Cheers
Al
Code:
Imports System.Text.RegularExpressions Sub Main(parm as object) dim sVal as string = hs.deviceString(506) dim splitVal() as string splitVal = sVal.split("m") splitVal(0) = StripTags(splitVal(0)) Dim Split0 As Double If Double.TryParse(splitVal(0),Split0) Then hs.setdevicevaluebyref(6469, Split0, True) Else hs.writelog("Number Conversion","Conversion Failed") End If End Sub Function StripTags(ByVal html As String) As String ' Remove HTML tags. Return Regex.Replace(html, "<.*?>", "") End Function
Cheers
Al
Comment