From: Jeff H. <Je...@Je...> - 2023-01-11 13:41:19
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>This is what we have in the NetRexx "Pipelines Stages.html" ( <a class="moz-txt-link-freetext" href="https://sourceforge.net/p/netrexx/code/ci/master/tree/documentation/njpipes/Pipeline%20Stages.html">https://sourceforge.net/p/netrexx/code/ci/master/tree/documentation/njpipes/Pipeline%20Stages.html</a> , unfortunately this is not available currently on NetRexx.org):</p> <p> <blockquote type="cite"> <h3>Delimited String</h3> </blockquote> <font face="monospace">|--+--------+--+--<i><span class="var">delimitedString</span></i>--+--| </font></p> <blockquote type="cite"> <div style="position: relative;"> <div class="desc"> <div class="p-ddiv"><font face="monospace"> +-STRing-+ +--<i><span class="var">DString</span></i>----------+ </font></div> <p><b>Examples:</b></p> <pre class="examp"> /abc/ ,, xf1f2f3 b11000001 str xabx </pre> <p>A delimited character string is written between two occurrences of a delimiter character, as a hexadecimal literal, or as a binary literal. The delimiter cannot be blank and it must not occur within the string. Two adjacent delimiter characters represent the null string. It is suggested that a special character be used as the delimiter, but this is not enforced.</p> <p>A hexadecimal literal is specified by a leading H or X followed by an even number of hexadecimal digits. A binary literal is specified by a leading B followed by a string of 0 and 1; the number of binary digits must an integral multiple of eight.</p> <p>The keyword STRING can be used to specify that the delimited string contains a string that is terminated by delimiter characters.</p> </div> </div> </blockquote> <p>And here is a modified version of one of the confirmation tests using both % and ! as delimiters around /-containing strings:</p> <p><font face="monospace">pipe (t)<br> -- inside dstring dstring ?<br> literal first one,second one,third one,fourth/one,fifth one,sixth/one,seventh one,eighth one |<br> split , |<br> <b>inside %fourth/% !sixth/!</b> |<br> cons pr /Raw: / |<br> c1: compare any ~2# 1 inside dstring dstring ~ equal ~*OK*~ notequal ~**FAIL** at rec \\c col \\b.~ less /Less:\nActual:\n\\p\nExpected:\n\\s\n/ more /More:\nActual:\n\\p\nExpected:\n\\s\n/ |<br> cons ?<br> literal fifth one; | -- expected result |<br> split ; |<br> c1: ? </font><br> </p> <p>gives me</p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">java </span><span style="color:#D3D7CF;background-color:#012456;">t Raw: fifth one 2# 1 inside dstring dstring *OK*</span></div> <p></p> <div class="moz-cite-prefix">So, I am not able to duplicate your problem at this time. Could you supply a sample of what is failing?<br> </div> <div class="moz-cite-prefix"><br> </div> <div class="moz-cite-prefix">Jeff</div> <div class="moz-cite-prefix"><br> </div> <div class="moz-cite-prefix">On 1/10/2023 11:30 PM, J Leslie Turriff wrote:<br> </div> <blockquote type="cite" cite="mid:202...@ma..."> <pre class="moz-quote-pre" wrap="">Hi, In pipeline stage 'inside' I need to match strings that contain /. I tried using ! and %, but they don't seem to work. What are safe string delimiters to use in a netrexx pipeline? Can they be any character that does not appear in the string, or are there restrictions? Hopefully it works the same way as CMS/TSO Pipelines (from the CMS/TSO Pipelines Author's Edition 1.1.12): | delimitedString: | | A delimited character string is written between two occurrences of a | delimiter character, as a hexadecimal literal, or as a binary literal. The | delimiter cannot be blank and it must not occur within the string. Two a | adjacent delimiter characters represent the null string. It is suggested | that a special character be used as the delimiter, but this is not | enforced. However, it is advisable not to use alphanumeric characters, | because a future release might add a keyword or a number as a valid option | to a built-in program where only a delimited string is valid today. | | A hexadecimal literal is specified by a leading H or X followed by an even | number of hexadecimal digits. A binary literal is specified by a leading B | followed by a string of 0 and 1; the number of binary digits must an | integral multiple of eight. | | The keyword STRING can be used to specify that the delimited string | contains a string that is terminated by delimiter characters. This acts as | a placeholder so that any non-blank character can be used as the delimiter | character. Note that this use of the keyword is in addition to a keyword | that is recognised by a built-in program. (Thus, split string string xabcx) | | Examples: | /abc/ | ,, | xf1f2f3 | b11000001 | str xabx Leslie -- _______________________________________________ netrexx-pipelines mailing list <a class="moz-txt-link-abbreviated" href="mailto:net...@li...">net...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines">https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines</a> </pre> </blockquote> </body> </html> |