non english input validation
tsvi
created: 2004-07-01 08:56:06
Hi, I need to use regular expression for checking theinput of non english language. can I work with ascii values in my regular expretion. thanks Tsvi
Re: non english input validation
created: 2004-07-01 09:04:52

Yes, you can. If you provide a regex and sample strings, we can help.

Re: non english input validation
ccn
created: 2004-07-01 09:45:54
print 'non english' if m/[\x7B-\xFF]/;
Re^2: non english input validation
created: 2004-07-01 12:13:01

You're not seriously implying that the presence of eight-bit characters implies non-English, are you?

That's just one end of the character set, and has nothing to do with language.

Re: non english input validation
created: 2004-07-01 09:53:30

This is highly non-trvial. It's easy to check for languages that don't share the same alphabet as English (they'll be using characters way outside the ASCII range), anything using Latin-1 is a lot harder. You might be able to find a stray accent mark, or see a few odd characters that are included in Latin-1 but aren't in English, but that's about it.

----
send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.

perlmonks.org content © perlmonks.org and ccn, hardburn, pbeckingham, tsvi

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03