Search Between Words Or After A Word?
May 12, 2009
complete coding newbie, but I'm trying to make a program that displays how many people are in a telephone queue by reading from a log file. and havign a timer update the number every 3rd second.
View 14 Replies
ADVERTISEMENT
May 8, 2012
changing the way the site search is done from just search a phrase as one string to searching a phrase "as multiple words" search. For example, if I search "cute puppy" right now, it will search it for "cute puppy" as phrase and won't match just "cute" and "puppy". The way the search is implemented is by passing a search phrase to a Stored Procedure in SQL Server.So now, I need to change to site search so when "cute puppy" is searched, it will search two words.... "cute" and "puppy" instead of just "cute puppy". Below is how the store procedure is implemented
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
[code].....
View 3 Replies
Dec 28, 2009
I've managed to become semi-literate in regex's, I'm stuck on this one though. I need to capture up to 5 words before and after a given word (not necessarily in the same sentence). So, for example, if the target word is AARDVARK in the following text:
AND A TRIP TO THE ZOO. THE AARDVARK WAS THE MOST INTERESTING CREATURE HE HAD EVER ...
I would like to capture {A, TRIP, TO, THE, ZOO} & {WAS, THE, MOST, INTERESTING CREATURE}. Obviously, if I could simply capture the whole string "A TRIP ... INTERESTING CREATURE", I can parse out the words.
View 5 Replies
Dec 18, 2011
Is there a simple way to insert a specific word between 2 or more words that of course have spaces?I'm doing if and next and if and next.I have 200 columns of programming for something that it may be simpler to make.So, p.e with the word "and", "Hello world" will be "Hello and world" or p.e. "Hello nice world" would be "Hello and nice and world".Words can also be like "Hello nice world"(doesn't show here,the spaces are "hello nice world" .I don't mind the spaces between to be only one but the words must be separated with the key word and space before and after.
View 6 Replies
Nov 4, 2009
How to show the word between some words?
Like:
<the word="Apple">
then show: Apple
View 18 Replies
May 16, 2011
I'm writing a text adventure that takes place in the World of Snorf.Console.WriteLine("You are in the world of Snorf. The sky is pink. A gentle breeze blows across your naked skin.") When I debug this, the line gets cut through the word "your".How can I have the words automatically wrapped between the words?
View 3 Replies
Oct 15, 2011
I was wondering how would i make a search kind of thing, for example if string1 contains all the words in string2 words. like a search(not just if string1 contains string 2).
it should work something like this:
If string1 is "an apple" and if string2 is "djsjfsfg apple sdfsfssdfs" then string3 would be nothing
BUT
If string1 is "an apple" and if string2 is "djsjfsfg apple sdfsfssdfs an ashdfjdsgfsdgfj" then string3 would be "djsjfsfg apple sdfsfssdfs an ashdfjdsgfsdgfj"
View 5 Replies
Jul 27, 2009
It has been a while since I have used regular expressions and I'm hoping what I'm trying to do is possible. I have a program that sends automated response regarding a particular file and I'd like to grab the text between two words I know will never change. In this example those words are "regarding" and "sent"
Dim subject As String = "Information regarding John Doe sent."
Dim name As String = Regex.IsMatch(subject, "")
So in this case I'd like to be able to get just "John Doe". Every regexp I'm coming up with includes the words "regarding" and "sent". How can I use those words as the boundaries but not include them in the match?
View 3 Replies
May 20, 2009
attached is my project on making multiple words from 1 word
This solves the word and has an option to save. Or it solves and saves all words in a list. I tried to do it with jokers using the jokers as every letter but it slows the program down drastically.
View 19 Replies
Jan 4, 2012
I need my VBA Macro to locate text throughout a document and move it. The information that needs moved can easily be detected by the font colors. For example:
"Celica Toyota": Toyota would always be a specific Green font and Celica would always be a specific blue. There can be more than one word in the range that needs swapped (ie: "Monte Carlo Chevrolet").
I have some really long drawn out code, but there's got to be something more efficiant.
View 2 Replies
Aug 7, 2011
I need to Replace two duplicate word into two different words.Like:
abc is a search engine and also abc a search engine.
to
google is a search engine and also yahoo a search engine.
I tried this.
Quote:
TextBox1.Text = Replace(TextBox1.Text, "abc", "google")
But it replaces all abc to google. But I need to change first abc to google and second abc to yahoo and so on.also tried this one
Quote:
Dim m14 As MatchCollection = Regex.Matches(TextBox1.Text, "abc", RegexOptions.Singleline + RegexOptions.IgnoreCase)
For Each n1 As Match In m14
Dim value As String = n1.Groups(0).Value
'MsgBox(value)
[code]....
View 1 Replies
Dec 6, 2011
I'm attempting to setup a search function from a string a user types. (ex: "John Doe" or "Doe, John") I was thinking I would use Replace(SearchString, ",", "") to get rid of the commas the user might enter, and then use Split(SearchString, " ") to get all the words into an array. Once they're in the array I would execute a Stored Procedure on each of the terms and build a DataTable with the results.
Below is what I'm wanting to use for executing my stored procedure.
oCommand = DataAccess.GetSQLCommand("MyStoredProcedure", CommandType.StoredProcedure, SourceServer.ConnectionLocal)
oCommand.Parameters.AddWithValue("@MySearchString", SearchString)
[Code]....
Now I'm thinking the "SearchString" I will assign while looping through my array of words... but this doesn't seem like the right way to do this. Maybe it is but I don't know how to append my next result to the previous DataTable either.
View 2 Replies
Mar 13, 2012
search.png What do i need to put in the search button so the words that i will put in the textboxes on the rightside will show the results on the left? the table name is Customers..i dont know how to put them in textboxes..
View 4 Replies
Jan 4, 2010
I have a textbox with a large amount of data, but I am trying to extract only the following into an array: only 3 or 4 letter, uppercase words. The goal is to find all stock symbols within a document.
For example, in this post, if I were to type "MSFT", regex would extract MSFT because it is a 4 letter, uppercase word.
View 15 Replies
Apr 28, 2009
I have an array of words that must be sorted alpabetically using selection sort, I must then be able to search the array with a binary search. I just can't get my head around how you would go about doing it. I know that the words must be first sorted into alphabetical order. Here is the code for selection sort with numbers:
Dim pass As Integer
Dim count As Integer
Dim minmax As Integer
Dim temp As Integer
[code]....
How would you apply that to an array of strings?
View 2 Replies
May 27, 2009
i want to search "words with mark" in txt file.For example: i want to search: "t�m" in my txt file. but my code couldn't find that word, it could find a word "tam".[code]
View 1 Replies
Mar 18, 2009
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn5vowel.Click
Dim rand As New Random
Dim alphabet As String
Dim i As Integer
For i = 1 To 200
alphabet = ChrW(rand.Next("A"),to ("z")
It is giving me that the expression must be expected. I have to choose and display the fifth vowel from the list of 200 random words.
View 5 Replies
Jan 27, 2010
I have a textbox which has about 120 lines of text but this can vary. I want to search for an array of words, like Boeing, Airbus, Saab etc there might be 3 options there might be 5 options in this array that i'm looking for. My question is how can I search the textbox and highlight all these words? Similar to (Control + F) in IE8. I've looked at InStr but am unsure if this is what I'm after as it does not seem to work for me.
View 4 Replies
Mar 18, 2011
I recently had some problems with the performance of the Word object model. In an add-in that I wrote for Word I need to parse through all the words of a document and replace some of them or ask the user for the ones that have multiple replacements. I know that it is faster to ask Word for all of the document text content at once and then process it and put it back all at once again, but this is not suitable for my add-in because I need to have access to the range objects that represent the words that have multiple replacements so that I can somehow mark them in the document and present the user with a tool tip from which he can select the replacement he wants.
So for the moment the single great speed improvement that came in my head was multithreading since most people already have dual core or better. The problem is that all the things you find on Google say that multithreading in Office is a very bad thing to do.
So is there any one who managed to do this in a manner that worked in most of its usage? By this I mean if it also worked on other PCs then the development one?
View 1 Replies
Nov 6, 2010
How to search and replace words in listbox items.
just can't seem to work it out
View 13 Replies
Jan 15, 2012
searching a database using multiple words from a textbox showing in gridview.
<asp:TextBox ID="TextBox1" runat="server" Width="382px" AutoPostBack="True"></asp:TextBox>
<asp:Button ID="Button1" runat="server" style="height: 26px" Text="Button" />
[Code]....
It works fine, i click button and the gridview shows all the right records. The problem is when i use more then 1 word in textbox. it shows nothing. The record in the database field may have several words, so i need to search using all words in textbox.
View 2 Replies
Aug 31, 2010
I would like to count the frequency of words (excluding some keywords) in a string and sort them DESC. So, how can i do it?
In the following string... This is stackoverflow. I repeat stackoverflow.Where the excluding keywords are
ExKeywords() ={"i","is"}
the output should be like
stackoverflow
repeat
this
View 2 Replies
Mar 6, 2010
I'm trying to make a form that will read my wordlist. txt (one word or phrase per line) then using a timer, insert one word randomly selected from the list, and display it in textbox1 where it will remain until another timer changes the word. The word in the textbox will display for a random time 1min to 7 min, then the textbox displays another word randomly selected from the word list.
View 1 Replies
Feb 24, 2009
i wanted to link options selected from Comb box A (general) to specific options in combo box B (specific). I want to pick a word in Combo box A that has specific words/phrases in Combo Box B show. But not all the words to show in the combo box B if they aren't associated with the Word picked in Combo Box A. Ex.When "Soda" is picked in A, only "Coke, Sprite, Fanta" should be visible in combo box b, not everything else.This is the code i used to make the boxes, but i don't know how to link them.
Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' fills the combo boxes with values
Me.xGeneralComboBox.Items.Add("Soda")
Me.xGeneralComboBox.Items.Add("Juice")
[code]....
View 7 Replies
Feb 12, 2011
I have 4 set of words store in array and wan randomly selects and scramble its letters in a label. i just know how to do the coding part of randomly display the words in the label but it no scramble i have no idea to do the scramble part, any expert can give the solution or example?
Below is my code:
Dim word(4) As String
Dim random As New Random
word(0) = "superman"
[CODE]...
View 4 Replies
Dec 5, 2009
im trying to search for a word in a string, when i find that word i want to enter into my if statement based upon dim position = 1
im aware that postion is 0 by default and -1 when the word is not there and 1 when its there.
'find covers and back drop
Sub findfiles()
Dim file_names As ReadOnlyCollection(Of String)
[Code].....
i get alist of directories and store them in an array. I step through the array (i) while search the string for the correct word.
View 5 Replies
Aug 3, 2009
How to search richtextbox for a certain word?
View 5 Replies
Dec 15, 2010
I am trying to split a long string based on an array of words. For Example:Words: trying, long, array Sentence: "I am trying to split a long string based on an array of words."Resulting string array:Multiple instances of the same word is likely, so having two instances of trying cause a split, or of array, will probably happen.
View 5 Replies
Mar 18, 2012
I'm having a little trouble trying to read a word document in vb. how to get the text out of the word document would be great.
View 4 Replies
Jul 29, 2009
I need to develop an application that can search through a book and list out all the pages and lines that contain a given keyword. For books that are split up in some other way, such as a bible which is split up by chapter and verse; they would be able to search for all verses that contain a certain keyword. Or alternatively, search within certain chapters and verses for a keyword. What format should I store the book into? Should it be stored into a SQL database? What format would be easiest for searching as opposed to easiest for storage?
View 7 Replies