Solved

Validating UTF8 using regex or other means

Posted on 2013-01-21
2
237 Views
Last Modified: 2013-01-21
I have been asked to vaidate a VB form where adresses are entered.  The problem at hand is that many addesses are copied and pasted from webpages and often relate to none english addresses.  I was thinking of using regex to achieve the validation and thereafter prompt the user to make the changes themself.  

What I am looking for is either a good regex string or suggestion of other means of doing this.
0
Comment
Question by:Alyanto
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 38800675
Unicode Regular Expressions
http://www.regular-expressions.info/unicode.html

Using Regular Expressions with The Microsoft .NET Framework
http://www.regular-expressions.info/dotnet.html

Or you can disable the paste-function in a textbox ...
http://social.msdn.microsoft.com/Forums/en-US/vbide/thread/1bf46245-4696-44f0-ab36-5fb51cb546cd/
You can also disable copy and paste when user attempts to do it using Ctrl+C and Ctrl+V.
to do this,Create a KeyDown Event handler for the text box and then paste this code:

If e.Modifiers = Keys.Control Then

e.Handled = True

MyTextBox.SelectionLength = 0

End If

Open in new window

0
 
LVL 1

Author Closing Comment

by:Alyanto
ID: 38800925
Thankyou that is just the job
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question