How would you replace a certain word from input to output? Like, if you type "Tigers are cool" in a text box I want the ouput after a button click to be "Lions are cool", changing 'tiger' to 'lion'. It should also be case sensitive so Tiger would convert to Lion, not lion.
I was created data bound grid with 5 colmns. And two cmds buttons and entered 200 data in all colmns. In the colm-5 text enter three or four line sentence like Seeta Rama Rao The following code to find the data of the rows and colmns.
I have a Visual Basic Program that I am trying to create for a college course. I have a few problems at this point.When the text from the string is added to the word box on the right, when it reads the text file it puts the last word of each sentence and the first word in the next sentence together and creates one word.I don't understand how in the loop i can keep track of instances of words and count them in array.Then display the words in the word box on the right with a - and then number of instances found.
I can search for the word Love in an .rtf file and return every occurance of the word into a RichTextBox. It returns the word and the scripture the word is in, but it also isreturning a bunch of weird text like: archan78988yykp etc etc. How do I onlyreturn the scripture with the searchedword, in this case the searched word is love. The code I am using is as follows:
< If Line.Contains(Me.rtbSearch.Text) Then 'show search form
Code: Public Function convert(ByVal sentence As String) As String Dim conv As String = sentence conv = Replace(conv, "I am ", "you are") conv = Replace(conv, "I'm", "you are")
[code]....
This works to some degree but a word like "Mommy" becomes "Momyour". Or "mean" becomes "youan" How can I do this with full words only? I've tried putting spaces before and after within the quotes, but then any of the words that need changed at the beginning of a paragraph, don't change because there is no space at the beginning.
Is it possible that I enter some sentence in textbox1 and when click on button, I want application get each word of that sentence and later I will do what I want with them.
Now, when I say "word check" I don't actually mean spell check or something like that, I just couldn't find a good 1 or 2 words explanation. (I use Visual Basic 2010). Here is what am I interested in: For example I want to make answering bot and when I write a sentence in a textbox how can I check does that sentence contain one specific word, for example if I write: "I feel bad", how do I check does that sentence contain word "bad" or word "feel".
I am developing a small program in vb6 that will work with an Arabic document, i want to count how many occurrence each Arabic letter appears in the document[code]...
i want to make the first letter of each word in a text box upper case. There is going to be 2 to 3 words in the text box. I can make the whole word uppercase with the following piece of code...
After I input a few sentences in a textbox, I need to find the longest sentence in the textbox by clicking a button. The longest sentence should be displayed in a MessageBox.
make a program to replace the word followed by the selected. But I got stuck at the start..An Example:"My name is Dunley Mike and my father, Dunley Robin are on a holiday at the mountain. There they will meet the uncle Dunley Harry." So what I want to do is to loop through the text for the word Dunley (Underlined) and replace the First name (Bolded) (Mike, Robin, & Harry) to 'family'.
I want to make the program check for a certain phrase/word in a sentence. Example- User types in google, program checks if theres an extension(or whatever its called)if there isn't, it will automatically put a .com after google.
I would like to change the case in a Textbox to look like a proper sentence, so the first letter would be capitalised and all following letters would be in lower case.
For example: original text: "this IS My Text" output text: "This is my text"
It is easy to change texts/strings between upper and lower case...
for example. String= "Hi VBFriends, I am learning VB 2010."
i need to replace only VB as C#.
if i put String.Replace, its changing as "Hi C#Friends,I am learning C# 2010."
i used regex, Word boundary but not worked, below my code.
Dim sHTMLStream As String = "Hi VBFriends, I am learning VB 2010." Dim oColl As MatchCollection = Regex.Matches("sHTMLStream", "\bvb", RegexOptions.IgnoreCase) For Each sTemp As Match In oColl MessageBox.Show(sTemp.Value) Next
I wana ask you if you think that's the best and the fastest way to replace <<words>> into a .doc file? I don't know other way and i think mine is too slow for doing this kind of job.[code]
Let's say I have an object that contains a Word property and a Sentence property. The sentence must use the word, and I want to replace the word in that sentence with a link using a public function (say, GetLinkedSentence). The catch is maybe the sentence uses a plural form of the word and maybe the "word" itself is actually a phrase, or is even hyphenated. There's no length limit to the word either. How do I find and replace this word (in ASP.NET, preferably VB) with a link [word])?
I have a tab delimited .txt file, I am reading successfully. Reading first line and split into array. Through the loop I am checking the duplicate column name.
Now I want, if duplicated word found, how can I replace the second one. Suppose my file contains Cell Site Cell ID Cell ID Site Detail 1 A 1 A1 ABC 2 B 2 B2 XYZ
I want to replace second Cell ID to Cell ID_2. Cell Site Cell ID Cell ID_2 Site Detail 1 A 1 A1 ABC 2 B 2 B2 XYZ
I am trying to replace an entire word in a string. This is my example string: "Hello test this is testing". I want to replace the word "test" with "abc". I want the output to be: "Hello abc this is testing". Whenever I try and use the Replace() function I get: "Hello abc this is abcing" How I can do this with Replace or RegEx
I want to open an existing document, find & replace some words and keep it's format as it is. the following is my code.
Dim oWord As Word.Application = CreateObject("Word.Application")' Open word document Dim docFile As String = vReportPath & txtInsRptNo.Text & ".doc" Dim oDoc As Word.Document = oWord.Documents.Open(docFile) Dim oTable1 As Word.Table [Code] .....
I am trying to use this code to shorten words like Hello to Hi, and Whats up to sup in a rich text box. If Value.Contains("Hello") Then Value.Replace("Hello", "Hi") End If End Sub
I want to replace the current word under mouse cursor while user click on contextmenustrip dorpdownitem. I can get the word but unable to replace the word with new one.
Here is my code: Private Sub tsmmutradifat__DropDownItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles tsmmutradifat_.DropDownItemClicked Dim myclickeditem As String = correct_word(e.ClickedItem.Text) Dim wordtoreplace As String If Not myclickeditem = Nothing Then If RichTextBox1.SelectedText = "" Then [Code] .....
i have created a template xml file witch contain some words like {contentname}.i need to replace such a tags with my values. how to search such a words and replace using filehandling in vb.net my xml templatefile is like this:
<!-- BEGIN: main --> <?xml version="1.0" encoding="UTF-8"?> <OTA_HotelSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
How do I take the input of a text box as as string and write out a procedure for a button that takes the input and outputs a variable in the list box. For example i want to assign various values to strings such as the price of a chair = $10 and price of table = $40 . How do would you write it so that when you click the button it takes the word chair in the text boxs and outputs a value in the list box.