legal identifier check

"Jérôme M. Berger" jeberger at free.fr
Mon Jun 1 00:18:39 PDT 2009


BCS wrote:
> Hello Saaa,
> 
>>> You have to write it yourself. Here's a good starting point:
>>> http://www.digitalmars.com/d/1.0/lex.html#identifier
>>>
>> Yes, that was my starting point and it seemed quite complex, thus my
>> question :)
>> I think I'll stay with my simple check for now as it isn't really
>> necessary
>> to be as strict as D's identifiers.
>> Just thought that if there was an easy check I'd implement that.
>> Thanks anyways everybody.
> 
> if you are only working with ASCII: use the regex `_A-Za-z[_A-Za-z0-9]*`
> 
	Shouldn't that be "[_A-Za-z][_A-Za-z0-9]*"?

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20090601/608162e5/attachment.pgp>


More information about the Digitalmars-d-learn mailing list