Re: Regular Expressions: DFSORT, ISPF: "$","^"

2024-04-20 Thread Paul Gilmartin
On Sun, 21 Apr 2024 04:03:48 +, Sri Hari Kolusu wrote:
>...
>I know you are detail-attentive, so I would add it to the next pub refresh, 
>but it only goes into 3.1 (may be V2R5 but not sure).
>
>^
>The caret symbol matches the beginning the string.
>
>$
>The dollar symbol matches the end of the string.
>
Thanks.  That's better.  But rather than replicating the regex specification
foe each UNIX Command  and each utility, with errors propagating and
needing redundant corrections, it would be better if each had hyperlinks
to a single, thorough IBM specification comparable to the Open Group's

9. Regular Expressions

But, Conway's Law  ...

(In vain hope, I perused Appendix C of the Unix Command Ref.  SA23-2280-60
only to find two nearly identical copies of a woefully inadequate 
specification.)

-- 
Thanks again,
gil



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Regular Expressions: DFSORT, ISPF: "$","^"

2024-04-20 Thread Sri Hari Kolusu
Paul,

DFSORT does indeed support "^" and "&" for the begin and end.

https://www.ibm.com/docs/en/zos/2.4.0?topic=statement-regular-expressions

If scroll down a bit in the above link, we do the examples.

^ibm
Matches records beginning with "ibm"
ibm$
Matches records ending with "ibm"
^ibm$
Matches records with exactly "ibm"

I know you are detail-attentive, so I would add it to the next pub refresh, but 
it only goes into 3.1 (may be V2R5 but not sure).

^
The caret symbol matches the beginning the string.

$
The dollar symbol matches the end of the string.




Would that work?

Thanks,
Kolusu
DFSORT Development
IBM Corporation

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Saturday, April 20, 2024 7:47 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Regular Expressions: DFSORT, ISPF: "$","^"

The description of regular expressions for DFSORT:
<https://www.ibm.com/docs/en/zos/3.1.0?topic=statement-regular-expressions>
mentions "$" to match the end of a string, but not "^" to match the beginning.

The description of regular expressions for ISPF:
<https://www.ibm.com/docs/en/zos/3.1.0?topic=string-regular-expressions-string1>
mentions neither "^" nor "$".

Are these omissions intentional?

--
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu<mailto:lists...@listserv.ua.edu> with the message: 
INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Regular Expressions: DFSORT, ISPF: "$","^"

2024-04-20 Thread Paul Gilmartin
On Sat, 20 Apr 2024 19:41:49 +, Farley, Peter wrote:

>For the ISPF case, I think the document writers think that they have covered 
>everything about the accepted regular expression syntax by stating up front on 
>that page:
>
>“ISPF uses the IBM® C regcomp() — Compile regular expression and regexec() — 
>Execute compiled regular expression functions to compile and execute a regular 
>expression . . .”
> 
If the list of syntactic rules is incomplete, they should be clearly
characterized as examples.

Also: 
A regular expression in a FIND, CHANGE, or EXCLUDE command allows
you to search for a string matching a basic or extended regular expression.

"basic or extended" -- it fails to indicate how the user can indicate whether
a basic or extended regular expression is intended.

>From:  Paul Gilmartin
>Sent: Saturday, April 20, 2024 10:47 AM
>
>Are these omissions intentional?

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Regular Expressions: DFSORT, ISPF: "$","^"

2024-04-20 Thread Farley, Peter
For the ISPF case, I think the document writers think that they have covered 
everything about the accepted regular expression syntax by stating up front on 
that page:

“ISPF uses the IBM® C regcomp() — Compile regular expression and regexec() — 
Execute compiled regular expression functions to compile and execute a regular 
expression . . .”

We will have to wait for Sri Kolusu to answer for the DFSORT case.

Peter

From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Saturday, April 20, 2024 10:47 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Regular Expressions: DFSORT, ISPF: "$","^"


The description of regular expressions for DFSORT:

<https://urldefense.com/v3/__https://www.ibm.com/docs/en/zos/3.1.0?topic=statement-regular-expressions__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!ISjCqr_3erWLCvri7EDUGaDALI5JZbBrCn-8xtm7byCaYpcu4YuqmgB5e79Zne4jTdkWsnfOsOiP9tpZPlNCZywa8UhWH-zyKo8savVm$<https://urldefense.com/v3/__https:/www.ibm.com/docs/en/zos/3.1.0?topic=statement-regular-expressions__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!ISjCqr_3erWLCvri7EDUGaDALI5JZbBrCn-8xtm7byCaYpcu4YuqmgB5e79Zne4jTdkWsnfOsOiP9tpZPlNCZywa8UhWH-zyKo8savVm$>>

mentions "$" to match the end of a string, but not "^" to match the beginning.



The description of regular expressions for ISPF:

<https://urldefense.com/v3/__https://www.ibm.com/docs/en/zos/3.1.0?topic=string-regular-expressions-string1__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!ISjCqr_3erWLCvri7EDUGaDALI5JZbBrCn-8xtm7byCaYpcu4YuqmgB5e79Zne4jTdkWsnfOsOiP9tpZPlNCZywa8UhWH-zyKl30sRdu$<https://urldefense.com/v3/__https:/www.ibm.com/docs/en/zos/3.1.0?topic=string-regular-expressions-string1__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!ISjCqr_3erWLCvri7EDUGaDALI5JZbBrCn-8xtm7byCaYpcu4YuqmgB5e79Zne4jTdkWsnfOsOiP9tpZPlNCZywa8UhWH-zyKl30sRdu$>>

mentions neither "^" nor "$".



Are these omissions intentional?



--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Regular Expressions: DFSORT, ISPF: "$","^"

2024-04-20 Thread Paul Gilmartin
The description of regular expressions for DFSORT:

mentions "$" to match the end of a string, but not "^" to match the beginning.

The description of regular expressions for ISPF:

mentions neither "^" nor "$".

Are these omissions intentional?

-- 
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN