<div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Date: Mon, 11 Jun 2018 11:03:13 -0700<br>
From: Leonard Daly <<a href="mailto:Leonard.Daly@realism.com" target="_blank">Leonard.Daly@realism.com</a>><br>
To: <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
Subject: Re: [x3d-public] SFImage regex<br>
Message-ID: <<a href="mailto:bbff6404-96fc-fc91-b9a7-6ba57d98b7e3@realism.com" target="_blank">bbff6404-96fc-fc91-b9a7-6ba57d98b7e3@realism.com</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
Andreas,<br>
<br>
There is an error in the regex:<br>
><br>
> Tangentially, repeated ranges also look not so nice but are apparently<br>
> common: [0-9a-fA-F]<br>
> [0-9]|[a-f|[A-F] reads better to me and that is why I preferred that.<br>
<br>
There should be a ']' after 'f'. Personally, I prefer the first form <br></blockquote><div><br></div><div>well spotted !</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[0-9a-fA-f] or even [a-fA-F\d]. If the entire string is case insensitive <br>
then use the language-specific 'i' mode or surround the entire string as <br>
in (?i)...[a-f\d]...(?-i) or shorter (?i)...[a-f\d]...<br></blockquote><div><br></div><div>The more familiar regex becomes, more concise variations may read better. i mode may not be supported by XML.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I prefer grouping all of the ranges together so that repeated <br>
vertical-ness is not present as it would be with ']|['. It also makes it <br>
clearer that the range of characters is all one unit.<br></blockquote><div><br></div><div>It does. Still, [a-fA-F0-9] may look a bit confusing to the casual regex users since there is a natural tendency to first join letters, then consider punctuation or signs.</div><div><br></div><div>In the end, it is just a personal preference,</div><div><br></div><div>-Andreas</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
-- <br>
*Leonard Daly*<br>
3D Systems & Cloud Consultant<br>
LA ACM SIGGRAPH Past Chair<br>
President, Daly Realism - /Creating the Future/<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180611/9c8f6f22/attachment.html" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180611/9c8f6f22/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of x3d-public Digest, Vol 111, Issue 39<br>
*******************************************<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div>