<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1808620350;
        mso-list-type:hybrid;
        mso-list-template-ids:1375130948 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:3;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:20.4pt;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:56.4pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:92.4pt;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:128.4pt;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:164.4pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:200.4pt;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:236.4pt;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:272.4pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:308.4pt;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:andreasplesch@gmail.com">Andreas Plesch</a><br><b>Sent: </b>Wednesday, June 6, 2018 4:05 PM<br><b>To: </b><a href="mailto:joedwil@earthlink.net">Joseph D Williams</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] X3D Regex</p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>On Wed, Jun 6, 2018 at 4:51 PM, Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p></div></div></blockquote></div></div></div><p class=MsoNormal>HI,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;border-color:currentcolor currentcolor'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b>From: </b><a href="mailto:andreasplesch@gmail.com" target="_blank">Andreas Plesch</a><br><b>Sent: </b>Wednesday, June 6, 2018 10:39 AM<br><b>To: </b><a href="mailto:x3d-public@web3d.org" target="_blank">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] X3D Regex</p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> Date: Wed, 6 Jun 2018 09:23:09 -0700</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> From: Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> To: X3D Graphics Working Group <<a href="mailto:x3d@web3d.org" target="_blank">x3d@web3d.org</a>></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> Cc: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>, "Humanoid</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>         Animation (H-Anim) Working Group" <<a href="mailto:h-anim@web3d.org" target="_blank">h-anim@web3d.org</a>></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> Subject: [x3d-public] X3D teleconference 5 JUN 2018 minutes: HAnim</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>         DIS, X3D Regex, Web3D 2018 and X3Dv4</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>...</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>         X3D Regular Expressions (regexes)</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>         <a href="http://www.web3d.org/specifications/X3dRegularExpressions.html" target="_blank">http://www.web3d.org/specifications/X3dRegularExpressions.html</a></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> Vince reports that MFInt32 problem stack-overflow error still remains when running X3D Schematron locally.  He will post the abridged example that is still failing, hopefully that will help our test efforts.</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> MFInt32 regex pattern:</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>         ((\+|\-)?(0|[1-9][0-9]*)?( )?(,)?( )?)*</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>         <a href="http://www.web3d.org/specifications/X3dRegularExpressions.html#MFInt32" target="_blank">http://www.web3d.org/specifications/X3dRegularExpressions.html#MFInt32</a></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>> I am looking at this regex and have a few questions.</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>> All groups are optional, so it seems to also match an empty string "".</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>> Perhaps not a problem, or even intentional.</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Totally intentional. We need the ability to legally load the node with no content then later, prior to actually running the scene. Add some attr content.</p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>>>> Yes, so the question is really if an empty string is a legal value. It may be intended as a signal to use the default value. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Fine observation. The default value may be the empty string.</p><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>> It matches a mix of commas and spaces, for example ",,,  , ,, ,,  ".</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>That is an error. Look at the entire range of X3DFields. I don’t think we want to allow a comma inside a tuple, just blank or comma between fields. </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>> This does not look like an acceptable MFInt32 value.</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Well, either space or comma is legal sep. Mix reads poorly but legal if number of </p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Not sure if there are no digits and just commas and spaces. "1,,2,,3" also matches. but I doubt that skipping entries is legal. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Matches what, there is a long list of X3DFOe;d forms and X3DArrayFIeld forms. Pretty sure that “,,” has got to be an error. However, look at implementations and see that most can be flexible to give the copy/paste or hand coder a break and at least not kill. . </p></div><div><p class=MsoNormal> </p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>> The second group (0|[1-9][0-9]*) : This is harder to understand. It</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>seems to want to address leading zeros. Why not just use ([0-9]*) ?</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Using <a href="https://regexr.com/" target="_blank">https://regexr.com/</a> and <a href="https://regex101.com/" target="_blank">https://regex101.com/</a> I could not come</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>up with a pattern where these expressions were not equivalent. What</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>would be an example where ([0-9]*) would not work ?</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>leading zero for decimal value?</p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>>>> [0-9]* matches 012 as well, so still looking for an example.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>012 is the same as 12 so maybe intent is leading 0 in decimals</p><p class=MsoNormal>There are fields where a 0 is legal. Again, I think there is a regex for every X3D field and X3DArrayField type,. </p></div><div><p class=MsoNormal> </p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>> <a href="http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#SFInt32" target="_blank">http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#SFInt32</a></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>allows hexadecimal values, using 0x prefix. I have never seen this but</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>the regex would not match, eg. produces a false negative.</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Looks like hex needs better regex. </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Tempted to give it a try, starting with SFInt32:</p></div><div><p class=MsoNormal>/[ \t]*[-|+]?((0x([0-9]|[a-f]|[A-F])+)|[0-9]*)[ \t]*/</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Translation: optional whitespace followed by optional plus or minus signs followed by </p></div><div><p class=MsoNormal>either 0x followed by a at least one digit or a to f or A to F letter</p></div><div><p class=MsoNormal>or by zero or more digits</p></div><div><p class=MsoNormal>followed by white space.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Is tab legal white space ? Is whitespace after the plus/minus sign allowed ? Hm, I guess so.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>>>> Testing this regex shows it works pretty well. One issue that it matches "  +  " without any digits. One could require at least one digit but then the empty string does not match any more. So one could make the complete  regex optional:</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>>>> /([ \t]*[-|+]?[ \t]*((0x([0-9]|[a-f]|[A-F])+)|[0-9]+)[ \t]*)?/</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So, for this one, the correct answer is Either this regex or the empty string. Seems like we ought to be able to say that. Esp for MFs where the [] is signal for empty</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>>>> How does that look for SFInt32 ? There is \d for digits and \s for white space but I am not sure how widely supported these are.</p></div><div><p class=MsoNormal>>>> /(\s*[-|+]?\s*((0x(\d|[a-f]|[A-F])+)|\d+)\s*)?/</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Has any toolmaker shown their regex? I don’t know what is the spec for ww3regex. </p></div><div><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>>> -Andreas</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thanks and Best, </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Joe</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>This mail thing I have gets lost in the processing very easy</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>-- </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Andreas Plesch</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Waltham, MA 02453</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>_______________________________________________</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>x3d-public mailing list</p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> </p></div></div></blockquote><p class=MsoNormal><br><br clear=all><br>-- </p><p class=MsoNormal>Andreas Plesch<br>Waltham, MA 02453</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>