Best Way Compare string to list of strings(RESOLVED) -
Trying to figure out the best way to approach this.
Basically I need to compare files(different each time) against a list of other strings to see if the file contains any of the strings(will be adding new ones to the list as I go on). I'll try to explain a bit more. For an example let's say I have 10 files and a list of 20 strings to look for. Keep in mind that when running live it will be processing 100's of files and looking for maybe 100+ strings so I want to make sure I code it optimal.
Not sure the best way to store the list to check for because I want it to be easy to add new ones to. Does it make sense to store in listbox and add new ones to it. Read file1 into a variable, loop the listbox items and check for Instr on the file1 contents, then read file2 and do the same thing?
Seems like there would be a better way to handle this.
Any suggestions appreciated.
Best Way Compare string to list of strings(RESOLVED) -
Trying to figure out the best way to approach this.
Basically I need to compare files(different each time) against a list of other strings to see if the file contains any of the strings(will be adding new ones to the list as I go on). I'll try to explain a bit more. For an exampl
How to compare multiple (part) strings -
Hi,
I have 2 listboxes and want to compare both and count in how many lines are identical strings. BUT .... I want to use part of the strings (same as with MID) and this part strings chance always.
For example: I want to compare at the begin the characters 1-5 then 2-6 then 3-7 a
complex string comparison -
Hi all,
I want to compare 2 strings of text (product description)
example:
string 1: Cup. knee 12mm x 15mm cap. 90degr.
string 2: VSH knee 12mm x 15mm 90 / cap.
these 2 strings represent the same product (different suppliers)
is there a way to compare the strings word by
Newbie questioon: String Comparison -
Ok, after looking on MSDN and doing some test of my own, I have no idea how to make this work.
Basically, I have 2 strings which being compared. Now my problem is that they are the string representation of integers. For example: the Number 8 as "8". Ok obvious i know.
Comparing Alpha Numeric Strings -
Hello,
I am trying to use VB6 to compare 2 strings character by character and writing to a list so that they are inserted at the correct position in the list Ascendingly.
Firstly i am suppose to first check the string if its numeric, if it is then i skip the process of co
[resolved]case-insensitive string compare -
Quickie - just looking for an existing function to compare example and eXamLe which will return true, without having to overload string.compare functions.
How can I move\delete a file from a textbox list -
Hi all,
Having a problem trying to figure this out.
I have two text boxes.
Text1 contains a list of file names I want to be left alone.
(Generated from my code as "file.INF")
Text2 contains a list of files from a user specified directory.
Textboxes are not necess
Comparing strings. -
Hi, need help on comparing strings. Is there any way to compare two strings such that String 1 can remove data in String 1 that already existed in String 2?
Compare each string with strings in array -
I need to search an array of strings and compare each string with a given string.
I count how many characters in the string that equals the string of the array.
In the beginning the array is empty. Depending on the result of the compare the array grows. That means that the array
list of strings -
hi,
is there an object or something existing in vb in which u can load several strings?? like a string list?? or should i use an array of strings??
Comparing 2 strings -
I have 2 strings containing elements. Iwant to compare them and remove any items from the first one that are already in the second string. I then want to add the items of the first string into a listview. Can anyone please give me the code for this?
removing quotes from strings ***RESOLVED*** -
Just a simple question,
I have a list box with strings and numbers contained in it. some of the strings have quotes around them but the numbers do not. I was trying to think of the quickest and easiest way to remove the quotes from around the strings. It is made harder by the fact t
compare string regardless of upper or lower case (Resolved) -
Hi,
I have got to compare a string with another string. How do I compare both string irregardless of case sensitve. Below are a few examples
star = Star
Star =star
matching should be done based on case insensitive.
Compare String in FlexGrid Cell to Excell Sheet Cell -
I have a string in a cell of a flexgrid that I want to compare to a string in an excel sheet cell
I tried doing this:
MsFlexGrid1.Col=0
MsFlexGrid1.Row=0
If MSFlexGrid1.Text = XLSheet3.Cells(3, 1) Then
'Do the stuff I want to do
End If
But it gives me a runtime error a
Compare two strings or two files -
In my form I have two rich text boxes.In both of them I put two different text files(.txt or .rtf).I looking for some code to compare them, and to have the result as marked differences into the second rich text box.How I have to compare them-as strings or as files? And how I can use mi
Comparing strings (same length) -
How can I compare 2 strings with a fixed length?
string #1 is "bla bla bla"
string #2 is "bla bla bla\bla"
^.........^ <- needs to be checked and should be ok.
string #1 is "bla bla blaa"
string #2 is "bla bla bla\bla"
[2005] compare strings -
I'm comparing 2 strings, they happen to be version numbers that have both numbers and letter(s) in the string, how can i tell if 123b is newer than 123a ?
How to compare 2 strings -
Hi!
I have a memory block where are many strings, but I cant compare them with a constant string!
Example:
"if" statement is using sizeof() and its not using strlen()
Is there some functions or do I need to make a for loop (which is slow) for checking the data?
Code:
How to compare one string to.....HELP!! -
Hello,
I'm trying to compare 2 strings(username, and password) to a textfie that I have loaded into my app, via richtextbox.
If there is a way to compare it without using the richtextbox that is cool. I have a textfile that has the usernames and accounts of my users in it. I get the
compare recordsets with listbox -
I have 3 recordset rs1,rs2,rs3
I compare the fields in rs1 ,s2 so if rs1<>rs2 then I put the missing data in a list box
How can I compare all the list items with rs3 so if list.item – rs3 field , not to appear in listbox??
Connection strings **Resolved** -
Hi,
Just been browsing the MSDN libraries online and I can't find a complete list of connection strings.
Is there such a list (has examples of connecting to Access 97, 2k, SQL Server, ODBC, DSN, Oracle etc...) available online anywhere?
Regards
Vince
How to compare two strings and integers -
Hi All,
I want to compare two strings /integer but I am not getting expected results
e.g
x = 5 , y = 5.00
x = y = Correct
-----------------------------------------------
x = "5" , y = "5.00"
x = y = incorrect
but
cint(x) = cint(y) = Corre
[2008] Compare one string to multiple/an array of other strings -
Hey Guys,
Does VB.NET have something where I can easily compare one string to a number of other strings?
For instance, right now I have something like this:
Code:
With Item
If _
.stringpart Like "* string one*" = Fal
Diff Algorithm -
Does anyone know where I can find an algorithm in VB that computes the delta between to strings? I'd like to compare two strings and store a delta between them so that given one string and the delta I can recreate the other string.
Thanks,
T
Filling a text box row by row -
I am not sure what the best solution is for this ...
A function will be called periodically and it will be passed a string with 15 characters in it - so, for example, over the course of half an hour, maybe 80 strings will be passed to the function.
I need to put the passed string
Writing the results of a StrComp to a text file -
I'm trying to write this program and i need to compare all the strings in 2 text files to see if any match. If they do, i have to get them to show up in a list box and written to their own text file (the matching strings). Sounds easy enough but i cannot figure it out. Any help would b
Compare texts strings in VB.NET from Access mdb -
Is there a way I can compare texts strings enter from a user at run time to an Access mdb field declared as memo? If there is a way, would anyone share it with me? The texts typed from a user at run time are from a text box compare to a SQL query from the Access mdb file. If that is no
array to list box -
Started teaching myself yesterday and stuck today! I need to transfer the whole of a dynamic array of strings (names) to a list box 1; when one of the first array strings is clicked in list box 1 another array of strings must be opened in list box 2.
If you can help me I would appre
Compare strings -
Guys,
How can I see if a string containing a single name, is contained within a longer string containing lots of names ?
Bob
MSComm1 Help -
I'm trying to read in strings of hex values, 12 bytes in total (ex. 01 09 0C 96 38 F0 07 00 00 00 00 5C). I want to be able to take these strings, ignore the first three bytes (they're always the same), and compare them so that they can be used in IF statements (ie IF "hex string&
String compare -
I have two strings to compare ,though they looks the same , the return boolean is false....
lstrString = (xlsheet.Cells(2, 1).Value) ' retrieve from excel which is empty
lstrString1 = ""
MsgBox IsNull(lstrString = lstrString1)
What happen?
Regards
Goh
basic_string comparison -
Is there a way to compare strings that is case insensitive? I know I can compare them using stricmp, but is there an inbuilt method or technique?
Thanks in advance
HD
Filtering the text -
Hi
How do i compare the current text in a combo box with the list of strings so lets say the user cannot introduce different things than the ones in the list of the combobox.
Did i explain myself ok?
Help please
Concatenate with spacing -
How do you concatenate two strings into a list box with spaces between the concatenation. IE, I want to put two string values together using a loop function. Each time it loops it concatenates the two stings and displays them in a list box. Is there something I can use to make the t
Compare strings -
I have seen examples here in the forums, but nothing solid. What is the best why to make sure two (in my case three) strings are indentical?
Thanks!
string compare - reg -
hi all
i want to know how we can find the difference between
two strings
help is appritiated
regards
kamesharun
I just can't get these strings to compare and DSN!!! -
I have this code (designed to see if a DSN exists) and the strings never seem to be the same (even though they definately are). If someone has a better way to check if a DSN exists, please let me know.
Private Function DSNList(DSNName As String)
Dim dSource As Integer
string help [resolved] -
I have written a program that gets ascii data from the com port, puts it into a string and displays that string. The strings are containing only 8 characters , which is making it hard for me to extract the data I want out of the strings. The data comes back as follows
stat
[local]
Buffering writes the serial port -
Hi all. This is my first post so have pity.
To business.
Im trying to buffer data being written to a device on a com port. The equipment attached to it does not use any form of flow contol and if you write to much information to quickly it falls over. So I have had the following
Need help pulling data out of a string (Resolved) -
Here is a sample string I'm reading in:
SkinsPerGameTypes=(package=R6Game,type=R6TeamDeathMatchGame,greenPackage=R6Characters,green=R6RainbowMediumTan,redPackage=R6Characters,red=R6RainbowMediumBlueCamo)
The parts in bold above are the strings I need to pull out of the string. T