Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37601
| From | "R.Wieser" <address@not.available> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Input field with a single character |
| Date | 2019-10-23 08:24 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <qoornl$1g3d$1@gioia.aioe.org> (permalink) |
| References | <44qdnScci8v4cjLAnZ2dnUU7-bnNnZ2d@westnet.com.au> |
Andrew, > I googled and found this > "??".codePointAt(0); > // "emoji".codePointAt(0); > which returns 128568 but that took me nowhere! You need the UTF-8 characterset*. Just like the codepoint 65 indicates the letter "A" all other codepoints indicate other symbols (though some codepoints will be represented by the same symbol). * like this one: http://isthisthingon.org/unicode/index.phtml In short, all you /can/ do is to figure out al the codepoints you wish to accept and check for them. > Is the lodash library regex what I should use? No idea. But looking at it it checks for ranges, which is, apart from the range 32 .. 126 (the standard keyboard symbols), the opposite of what you are after. Regards, Rudy Wieser
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Input field with a single character Andrew Poulos <ap_prog@hotmail.com> - 2019-10-23 17:12 +1100
Re: Input field with a single character "R.Wieser" <address@not.available> - 2019-10-23 08:24 +0200
Re: Input field with a single character JJ <jj4public@vfemail.net> - 2019-10-23 15:28 +0700
Re: Input field with a single character Jon Ribbens <jon+usenet@unequivocal.eu> - 2019-10-23 12:24 +0000
Re: Input field with a single character Martin Leese <please@see.Web.for.e-mail.INVALID> - 2019-10-23 09:40 -0600
csiph-web