Home > Net >  How can the whole word match?
How can the whole word match?

Time:10-16

Str4=SS Readtoend read text, many ways!
Str3=str4. Replace 33 (1)
So if the text in 123 just 1 also replaced with 33, how can the whole word matching to replace? (is similar to that of the full word matching) on the clipboard

CodePudding user response:

Replace with regular
([^ \] d) 1 ([^ \] d) - & gt; $133 $2

CodePudding user response:

In addition, the text contains a lot of words with 1, such as: 15138, 1 ab,
T1, etc., how can achieve full word matching?

CodePudding user response:

If it is: 15138, 1 ab, so you take the characters into an array, dim h () as string=str4. Spilt (", ")
To do a loop, determine whether each group of data contains the Numbers 1,, there is a direct assignment, contains
For each s as a string in h ()
If s. the Contains (" 1 ")
S="33"
End the if
next

CodePudding user response:

reference 3 floor light hong wan li reply:
if it is: 15138, 1 ab, so you take the characters into an array, dim h () as string=str4. Spilt () ", "
To do a loop, determine whether each group of data contains the Numbers 1,, there is a direct assignment, contains
For each s as a string in h ()
If s. the Contains (" 1 ")
S="33"
End the if
Next

Thanks first, if the text line,, and other symbols, and how to deal with, (want to really like text in software word matching replace)

CodePudding user response:

Qq_44751881
reference 4 floor response:
Quote: refer to the third floor light hong wan li reply:
if it is: 15138, 1 ab, so you take the characters into an array, dim h () as string=str4. Spilt () ", "
To do a loop, determine whether each group of data contains the Numbers 1,, there is a direct assignment, contains
For each s as a string in h ()
If s. the Contains (" 1 ")
S="33"
End the if
Next

Thanks first, if the text line,, and other symbols, and how to deal with, (want to really like text in software word matching replace)


Spilt (this parameter is separator), you would find the rules to handle the document content are commas, for example, that is spilt (", "), you said all words match is not the same as conventional said the whole word matching, whole word matching probably means I want to find "A1V2" this string of characters, case sensitive length the same content, you said all words should be a character string that contains a character,

CodePudding user response:

I want is this: the whole word matching probably means I want to find "A1V2" this string of characters, case sensitive as the content of the length

CodePudding user response:

refer to fifth floor light hong wan li reply:
Quote: refer to 4th floor qq_44751881 response:

Quote: refer to 3rd floor light hong wan li reply:
if it is: 15138, 1 ab, so you take the characters into an array, dim h () as string=str4. Spilt () ", "
To do a loop, determine whether each group of data contains the Numbers 1,, there is a direct assignment, contains
For each s as a string in h ()
If s. the Contains (" 1 ")
S="33"
End the if
Next

Thanks first, if the text line,, and other symbols, and how to deal with, (want to really like text in software word matching replace)


Spilt (this parameter is separator), you would find the rules to handle the document content are commas, for example, that is spilt (", "), you said all words match is not the same as conventional said the whole word matching, whole word matching probably means I want to find "A1V2" this string of characters, case sensitive length the same content, you said all words should be a character string that contains a character,

Want is this: the whole word matching probably means I want to find "A1V2" this string of characters, case sensitive as the content of the length

CodePudding user response:

refer to 6th floor qq_44751881 response:
what I want is this: the whole word matching probably means I want to find "A1V2" this string of characters, case sensitive length as the content of the


Dim As String s="ddsafjsdkjflka1V2Dim a As Integer=nr. IndexOf (A1V2) DSFSDFJKSLDJLKS can query the female talent, xcmnkjklfjdslkjweioilkjrtlA1V2kjklsddf"
TextBox1. Text=s
S=s.R eplace (" A1V2 ", "test")
TextBox1. Text=TextBox1. Text & amp; Environment. The NewLine & amp; Environment. The NewLine & amp; S

The Replace the whole word matching,
  • Related