removing hyphens from a value
-
How do I remove a hyphen from a text? I'm retrieving the value from a textbox. The value, for example is 567-343, how do I get rid of the hyphen? The trim("-") function doesn't work on this value. Thanks!
Trim only removs the specific char from start and end of the string.In order to remove the char inbetween the string you can use split method or regular expression.I think in your case split method should be good enough.you can refer this code segment Dim FinalString as String Dim ActualString as String ="567-343" Dim splitString() as String=ActualString.split 'this returns an array of String Dim i as integer For i=0 to SplitString.length-1 if not(SplitString(i)="-") then FinalString=FinalString & SplitArray(i) end if next Hope this Helps Mandar Patankar Microsoft Certified professional Today Was not that Good..But I got tommorow.. :)
-
How do I remove a hyphen from a text? I'm retrieving the value from a textbox. The value, for example is 567-343, how do I get rid of the hyphen? The trim("-") function doesn't work on this value. Thanks!