Compare Letters Of A String To See If They Match
May 18, 2012
I am making a question and answer game, and I would like to be able to give the user some slack in the answers if they were to misspell a word by a letter or two, like if the answers was Jumps and they type Jump if you did a comparison of them like If string1 = sring2 then do whatever, but obliviously those to string dont match, so it would return false, even though it is the right answer, I came up with this routine to compare two words and if the percentage of the letters are higher then 82 % right it will give you credit for your answer.
[Code]...
View 7 Replies
ADVERTISEMENT
Dec 2, 2011
Well my question is simple, I want to match a string with following attributesNo white spaceMust start with a letterMust not contain any other special characters other than nderscore
View 2 Replies
Jul 14, 2011
I need a regular expression that will match this pattern (case doesn't matter):066B-E77B-CE41-4279
View 4 Replies
May 10, 2009
I wanted to ask how should i read the text file find a value and place it in textbox then find for the same value from other part but at the same text file.
I give the example of my text file:This is one part.
[Code]...
View 1 Replies
Apr 9, 2010
I want to compare two array and save the miss match character into 3rd array.
View 1 Replies
Apr 10, 2009
I'm having a problem converting a string of letters to a string of numbers. I've tried:
Dim A As String = ""
Dim strOutput As String = ""
Dim X As Integer = 0
[Code].....
View 4 Replies
Oct 8, 2009
The database field has text inside the field and I want to match it with another string...How do I convert a field to a string?
View 7 Replies
Jun 9, 2009
Im trying to work out what the best way to match 2 strings together, but with a difference.
String1 = "dog cat bird chair book table"
String2 = "the dog chassed the cat around the chair"
No I know I can break string1 up by space character and check if each word appears in string 2, I would prefer to not have to do that.If there some sought of regex that would take a group of words and retrun how many of them matched ?
View 2 Replies
Mar 16, 2011
I want to make a Quotaiton ID the first 4 letters of the Car Registation number and the Customer ID. How would i go about doing this please ??
QuotationIDtextbox.Text = CarRegistationTextbox.Text.ToUpper & QuoationsCustIDTextBox.Text
View 2 Replies
Mar 30, 2009
I'm trying to make a program that takes input from the user and take what they put in an take every letter and give it a value. Like a code or something so if they have "Apple" then it changes to something like "122515" so[code]...
View 3 Replies
Sep 24, 2009
im looking for a code setup where the program can get a numerical value based on letters in a user inputted string, and output the value A=1, B=2, C=3, etc
View 19 Replies
Dec 6, 2009
for example, string="trujade". how would i go about randomizing the letters in the string to look like the matrix code? change each letter in the string "trujade", randomly to a different alphabet letter. [URL]
View 2 Replies
Mar 21, 2010
I'm trying remove non-letters from this string I have. I have an order form for hats and T-shirts, they select everything and click on buy button there order info shows up in a listbox. For the results in the listbox I break down there order info and show there total price. Well the string I have for the sizes comes up with Medium "7 1/8 - 7 1/4" in the list box. I want to remove non-letters and have it just show "Medium". I try using the instr function and the trim function as well but nothing is happening.
View 1 Replies
Nov 20, 2009
This seems a simple enough thing to to but its giving me problems. What I have is this; a text box the user enters a word into, then a btnReverse that when clicked should cause the inputted word to display in reverse in lblReverse.Text. What seemed to me to be the easiest solution was this;
Option Explicit On
Option Strict On
Option Infer Off
Public Class frmMain
[code]....
View 2 Replies
Feb 14, 2009
how to take a name entered in a text box and convert only the first letter of each name to upper and then convert the rest to lower.
Ex: "john doe" --> "John Doe"
"jAkE sMiTh" --> "Jake Smith"
View 4 Replies
Oct 21, 2010
I have a string of randomly organized characters and I am trying to search a wordlist for matches. If the wordlist has a match I want it to add it to a listview. I wasn't for sure how to word the first two sentences and I think an example will help explainmy problem better. So here is an example. I have a textbox where you input what you want to search for in the wordlist. Lets say you type in tca . The wordlist contains cat frog dog , each word on a separate line. What i want to do is take what you typed in the textbox, tca , and find the word cat in the wordlist.
[code]...
View 3 Replies
May 9, 2009
So I basically want to make sure that a string entered by the user is valid. Valid being over 10 characters, containing only upper case characters, and only characters A - Z and spaces. The first two were easy, but I'm having trouble with the third, though.What I originally attempted to do was create a loop which checks if the first invalid character is present with the InStr function, by using the characters ASCII value. The next ASCII value is then checked, and so on until it has checked the string for every single invalid character. If an invalid character gets picked up, 1 is added to a variable, and after the loop is finished executing, if the variable is no longer 0, invalid characters have been detected.
View 3 Replies
Nov 4, 2009
QuoteWrite a Visual Basic Console Application which executes a Do-While loop repetitively. Each time the Do-While loop executes input a String value, count and display the number of occurrences of the letters �a�, �b�, �c�, �d� and �e�. Use at least one Select Case statement inside your Do-While loop. For example, suppose during one execution of the Do-While loop you input the following String value: �My mother is a great lady!�. Your program should input this value into a String variable, compute the number of times each of the letters �a�, �b�, �c�, �d� and �e� occurs and output the results: a � 3, b � 0, c � 0, d � 1, and e � 2. Terminate your Do-While loop once a value of �All Done!� is entered for the String value.
Here is my code:
Dim s1 As String
Dim a, b, c, d, e, count As Integer
Do While (s1 <> "all done")
[Code].....
View 3 Replies
Nov 5, 2009
My problem is an error that states Variable 'count' hides a variable in an enclosing block. Here is my project and my code so far:
1. Write a Visual Basic Console Application which executes a Do-While loop repetitively. Each time the Do-While loop executes input a String value, count and display the number of occurrences of the letters �a�, �b�, �c�, �d� and �e�. Use at least one Select Case statement inside your Do-While loop. For example, suppose during one execution of the Do-While loop you input the following String value: �My mother is a great lady!�. Your program should input this value into a String variable, compute the number of times each of the letters �a�, �b�, �c�, �d� and �e� occurs and output the results: a � 3, b � 0, c � 0, d � 1, and e � 2. Terminate your Do-While loop once a value of �All Done!� is entered for the String value.
2. In the same Visual Basic Console Application, following the Do-While loop described in step 1. above, enter another String value and modify it by replacing all occurrences of the word �hi� with �hello�; all occurrences of the word �today� with the word �tomorrow�; all occurrences of �hate� with �love�. Output both the original String value and the modified String value.
This is my code:
Module Module1
Sub Main()
Dim s1 As String
Dim a As Integer = 0
Dim b As Integer = 0
[code].....
View 5 Replies
Nov 19, 2008
Im programming a simple console application for the hell of it that performs a simple encryption on a string entered by the user. The encryption is simply swapping the 2 adjacent letters throughout the string. i.e encryption would become nercpyitno.
View 2 Replies
Feb 20, 2010
I want to check for the letters of the given string. for example: the string = Visual Studio next is i want to check per letter of the string. next I want to change V to x
View 1 Replies
Sep 12, 2011
How do I remove the first 6 letter from string?
View 15 Replies
Aug 1, 2011
I have :
[Code]...
I think I have explained my problem properly..
View 2 Replies
Apr 18, 2011
I'm currently trying to match a word in a string - to a word in an 1 dimensional arrray.
So it does this.
1.Goes into array, gets first word.
2.Looks for that word in the string.
3.If can't find it, go to next word in array.
4.And so forth until it finds it or runs out of words in array.
Problem is the string can be upto 2000 characters long. And the Array with the possible matches can have upto 8000 entries.
So when it runs, if the word begins with 'A' it finds it dead quick as the 'A's are at the top of the array, ordered alphabetically. This is great.
But if the word starts with 'Z' then it takes 4-5 seconds before finding it.
I'm basically using InStr to find the word in the string.
View 5 Replies
Jun 9, 2011
how to check if the user input has a match in my given string
Dim a as string
a = "abc"
if the user input in the textbox "erty" the message box will be shown string not found. if the user input 123abc the message box will be string found
View 3 Replies
May 10, 2012
I have a string in Arabic characters that also contains some English words. I want to manipulate the English words only. How can I recognize the English words in the string?
I am using vb express 2005.
View 4 Replies
Jul 17, 2010
How can I generate a random string of 8 numbers and letters?
View 8 Replies
Jan 17, 2012
I have to (for class) make a program that generates a safe passwords for people to use. My teacher wants us to make the passwords vary in length, include numbers, letters and upper case letters. I've been able to write code that prints out a random string but it includes unrecognized characters for most passwords. How would I write the code to create a random string that has parameters? (in this case upper case lower case letters and numbers).
View 9 Replies
Dec 16, 2009
I would like to convert a String into an Integer.
My String is filled with one- or two digit numbers, letters and characters, e.g.[code]...
View 3 Replies
Feb 24, 2012
In a program used to find words from random scrabble letters how do you loop through each of the possible combinations of letters? ie: abc acb bac bca cab cba
View 1 Replies