Click here to Skip to main content
15,888,803 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: show/hide datagridview rows by setting trackbar value Pin
Luc Pattyn4-Feb-12 3:30
sitebuilderLuc Pattyn4-Feb-12 3:30 
GeneralRe: show/hide datagridview rows by setting trackbar value Pin
bezkintos4-Feb-12 6:22
bezkintos4-Feb-12 6:22 
AnswerRe: show/hide datagridview rows by setting trackbar value Pin
Luc Pattyn4-Feb-12 6:43
sitebuilderLuc Pattyn4-Feb-12 6:43 
GeneralRe: show/hide datagridview rows by setting trackbar value Pin
bezkintos4-Feb-12 7:51
bezkintos4-Feb-12 7:51 
AnswerRe: show/hide datagridview rows by setting trackbar value Pin
Luc Pattyn4-Feb-12 8:02
sitebuilderLuc Pattyn4-Feb-12 8:02 
GeneralRe: show/hide datagridview rows by setting trackbar value Pin
bezkintos4-Feb-12 8:34
bezkintos4-Feb-12 8:34 
AnswerRe: show/hide datagridview rows by setting trackbar value Pin
Luc Pattyn4-Feb-12 9:19
sitebuilderLuc Pattyn4-Feb-12 9:19 
Questionhaving trouble replacing Trademark and Registered symbol with Regex Pin
David Mujica2-Feb-12 6:18
David Mujica2-Feb-12 6:18 
I'm trying to remove the ® and ™ symbols in a string using Regex and it doesnt work for the ™ symbol.

Here is some example code:

VB
Dim s1, s2, s3 As String
      Dim i As Integer

      s1 = "Trademark" + Chr(153) + " Registered" + Chr(174)


      s2 = System.Text.RegularExpressions.Regex.Replace(s1, "[\x99]", "(TM)")
      s3 = System.Text.RegularExpressions.Regex.Replace(s1, "[\xAE]", "(R)")


      Debug.Print("Orig: " + s1)
      For i = 0 To s1.Length - 1
          Debug.Print("     " + s1.Substring(i, 1) + " " + Asc(s1.Substring(i, 1)).ToString("X") + " " + Asc(s1.Substring(i, 1)).ToString)
      Next

      Debug.Print("S2  :  " + s2)
      Debug.Print("S3  :  " + s3)


This code seems to work for the (R) symbol, but not the (TM).

However, if I use Chr(153) instead of \x99 in the regex call, the code works fine.

What am I doing wrong?
Thanks.
AnswerRe: having trouble replacing Trademark and Registered symbol with Regex Pin
Luc Pattyn2-Feb-12 9:05
sitebuilderLuc Pattyn2-Feb-12 9:05 
QuestionADO.net Pin
Amanjot1-Feb-12 12:09
Amanjot1-Feb-12 12:09 
AnswerRe: ADO.net Pin
Eddy Vluggen1-Feb-12 12:21
professionalEddy Vluggen1-Feb-12 12:21 
QuestionCreate a unique Id for each row of table Pin
Seema Bawa1-Feb-12 8:19
Seema Bawa1-Feb-12 8:19 
AnswerRe: Create a unique Id for each row of table Pin
Simon_Whale1-Feb-12 12:16
Simon_Whale1-Feb-12 12:16 
JokeRe: Create a unique Id for each row of table Pin
Eddy Vluggen1-Feb-12 12:30
professionalEddy Vluggen1-Feb-12 12:30 
GeneralRe: Create a unique Id for each row of table Pin
Simon_Whale1-Feb-12 21:58
Simon_Whale1-Feb-12 21:58 
AnswerRe: Create a unique Id for each row of table Pin
RobCroll1-Feb-12 16:14
RobCroll1-Feb-12 16:14 
QuestionCreate a unique Id for Rows Pin
Seema Bawa1-Feb-12 7:58
Seema Bawa1-Feb-12 7:58 
AnswerRe: Create a unique Id for Rows Pin
Eddy Vluggen1-Feb-12 8:16
professionalEddy Vluggen1-Feb-12 8:16 
QuestionOptional parameters cannot have structure types Pin
Clark Kent1231-Feb-12 5:53
professionalClark Kent1231-Feb-12 5:53 
AnswerRe: Optional parameters cannot have structure types Pin
Eddy Vluggen1-Feb-12 6:34
professionalEddy Vluggen1-Feb-12 6:34 
GeneralRe: Optional parameters cannot have structure types Pin
Clark Kent1231-Feb-12 7:16
professionalClark Kent1231-Feb-12 7:16 
GeneralRe: Optional parameters cannot have structure types Pin
Eddy Vluggen1-Feb-12 7:41
professionalEddy Vluggen1-Feb-12 7:41 
QuestionFrom Variant/double() to Double() Pin
PozzaVecia31-Jan-12 11:54
PozzaVecia31-Jan-12 11:54 
AnswerRe: From Variant/double() to Double() Pin
Eddy Vluggen1-Feb-12 9:47
professionalEddy Vluggen1-Feb-12 9:47 
GeneralRe: From Variant/double() to Double() Pin
PozzaVecia1-Feb-12 10:28
PozzaVecia1-Feb-12 10:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.