r/visualbasic • u/Dennis13631 • Jan 12 '20
Need a bit help
So ive done a program and my teacher just casually said its spagheti code and i need to somehow fix it but im totally out of idea how to do that so i would appreciate all help i can get from here!
Here is the code:
https://pastebin.com/qzPbMXh8
6
Upvotes
1
u/Songg45 Jan 12 '20
Thats my Regex (or REGular EXpression). It allows me to quickly determine patterns in text. I move text to the pattern search, and tell it to match anything thats 0-9, bcdhnot, or AEFGHLPUY. If you had the full alphabet, it would be ("[0-9][A-Z][a-z]")
If it gets a match, then the function returns true and the program continues. If it doesn't get a match, or text is longer than 1 character, the function returns false and fails.