[jdev] JID Validation

Matthew Miller linuxwolf at outer-planes.net
Thu Nov 29 15:05:36 UTC 2012

On Nov 29, 2012, at 5:25 AM, Lucas Betschart <lucasbetschart at gmail.com> wrote:

>> What programming language do you use?
> PHP. But any regex would be welcome. It shouldn't be hard (if even
> necessary) to port a regex.

There is no regex that will suffice for properly validating JIDs; proper preparation and validation of JIDs requires a fair amount of logic.

Fortunately, there are implementations available, but they're not PHP specific.  The two most popular C-based ones I'm aware of are libIDN and ICU4C.  It appears there are PHP wrappers for both out there.

- m&m

Matthew A. Miller
< http://goo.gl/LK55L >

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2305 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20121129/1cc6f061/attachment.bin>

More information about the JDev mailing list