<div dir="ltr"><div dir="auto"><div>Hi Don<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 7, 2018, 12:17 AM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">great to see the dialog and scrutiny, thanks!<br>
<br>
intent is to allow legal/standard content but disallow (or at least diagnose) broken/problematic/nonstandard content.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I think it may be helpful to more definitely state what the function of the regex is:</div><div dir="auto"><br></div><div dir="auto">- flag certainly broken content but still allow questionable content</div><div dir="auto">- only allow well behaved content and flag questionable but parseable and possibly legal content</div><div dir="auto"><br></div><div dir="auto">There could be two versions, strict and lax.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
for MFInt32,<br>
<br>
- legal: 0 1 2 30 -0 -1 -2 -30<br>
<br>
- illegal: 010 -020 (leading zeroes also an indicator that intermediate whitespace was dropped)<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The official regex /((\+|\-)?(0|[1-9][0-9]*)?( )?(,)?( )?)*/ currently allows leading zeros as legal, perhaps by accident.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
- single comma OK between numbers, but multiple commas an indicator that an intermediate number was dropped<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The official regex currently allows multiple commas.</div><div dir="auto"><br></div><div dir="auto">Other patterns to clarify as being considered problematic include:</div><div dir="auto"><br></div><div dir="auto">- +0</div><div dir="auto">- -0</div><div>- + 12 (white space after sign)</div><div>- tab,newline,return as white space</div>- capital letters for hex: 0xAF<br><div>
<div>- 0X in addition to 0x as prefix for hexadecimal</div>
</div><div><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I have the O'Reilly books on this topic, they often give good/adaptable "cookbook recipes" worth considering. can look further next week.<br>
<br>
it is helpful to be very wary of any conclusions whatsoever without testing a regex.<br></blockquote><div><br></div><div>Oh yes. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
if alternatives are found, great - we can test with online tools, with Netbeans/X3D-Edit, and with regression testing of the X3D Examples Archive.<br></blockquote><div> </div><div>It sounds like the current regex does not quite match expectations.<br></div><div>The archive may not have leading zeros anywhere ? Or some of the other problematic patterns like multiple commas ?<br></div><div><br></div><div>-Andreas<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
all the best, Don<br>
-- <br>
Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" rel="noreferrer" target="_blank">brutzman@nps.edu</a><br>
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer noreferrer" target="_blank">http://faculty.nps.edu/brutzma<wbr>n</a><br>
<br>
</blockquote></div></div></div>
</div>