Eric,,
Ok, that works, but its not what I expected from reading the docs. The docs for
REG_NOSUB parameter to regcomp.
REG_NOSUB
Report only success or fail in regexec(), that is, verify the syntax of a
regular expression. If this flag
is set, the regcomp() function sets re_nsub to the number
You used REG_NOSUB on the regcomp, which just verifies the syntax. You want
REG_EXTENDED since you have an extended regex.
Eric Rossman
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Seymour J Metz
Sent: Friday, June 30, 2023 11:17 AM
To: IBM-MAIN@LISTSERV.UA.EDU
I don't understand. A ^ at the beginning of a character class is a Not. The
regex should match a string of invalid characters, or fail if there are none.
From: IBM Mainframe Discussion List on behalf of
Eric Erickson
Sent: Friday, June 30, 2023 10:56
the web tool is
"[^A-Z0-9@#\$\}\-]+" which when I bring that up the mainframe I change to
"[^A-Z0-9@#\\$\\}\\-]+" as I have to double the escape (\) otherwise the
compiler issues a message.
Even when I shorted the regex to ""[^A-Z0-9]+" is returns a 1 for both
On Tue, 25 Oct 2022 10:33:23 -0500, Paul Gilmartin wrote:
>On Tue, 25 Oct 2022 08:55:09 -0500, Walt Farrell wrote:
>On Sat, 22 Oct 2022 04:09:43 +, Sri h Kolusu wrote:
>> %03=(ENDBEFR=C'.',FIXLEN=8), # Node 3
>> ...
>Thanks. I've wished for
On Tue, 25 Oct 2022 08:55:09 -0500, Walt Farrell wrote:
>>>
On Sat, 22 Oct 2022 04:09:43 +, Sri h Kolusu wrote:
> %03=(ENDBEFR=C'.',FIXLEN=8), # Node 3
> ...
Thanks. I've wished for something line FIXLEN in regular expressions.
>>>
>>>Got an example
On Sun, 23 Oct 2022 09:36:49 -0500, Paul Gilmartin wrote:
>On Sun, 23 Oct 2022 08:59:09 -0500, Walt Farrell wrote:
>>
>>>On Sat, 22 Oct 2022 04:09:43 +, Sri h Kolusu wrote:
%03=(ENDBEFR=C'.',FIXLEN=8), # Node 3
...
>>>Thanks. I've wished for something
On Sun, 23 Oct 2022 08:59:09 -0500, Walt Farrell wrote:
>
>>On Sat, 22 Oct 2022 04:09:43 +, Sri h Kolusu wrote:
>>> %03=(ENDBEFR=C'.',FIXLEN=8), # Node 3
>>> ...
>>Thanks. I've wished for something line FIXLEN in regular expressions.
>
>Got an example of what you
On Mon, 9 Apr 2018 10:28:34 -0400, Charles Mills wrote:
>To clarify, by "works" you mean does NOT ABEND?
Oops, yes, I meant "does not ABEND".
--
For IBM-MAIN subscribe / signoff / archive access instructions,
That fixed it. Thanks,
Charles
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf
Of David Crayford
Sent: Tuesday, April 10, 2018 8:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Any C++ regex template class gotchas?
It seems that you
It seems that you don't have extended0x defined as regex_p is defaulting
to an integer.
On 10/04/2018 6:26 PM, Charles Mills wrote:
Auto seems to have some sort of limitations
auto regex_p = new std::tr1::regex("foo", flags);
"/u/xx/FEB2018/Source/SANDBOX.C", li
Initializing in the constructor no help:
std::tr1::regex *regex_p = new std::tr1::regex("foo", flags);
// here we would use the regex
delete regex_p;
CEE3204S The system detected a protection exception (System Completion
Code=0C4).
Auto seems to have some sort of limitations
auto regex_p = new std::tr1::regex("foo", flags);
"/u/xx/FEB2018/Source/SANDBOX.C", line 27.20: CCN5257 (S) An object or
reference of type "int" cannot be
initialized with an expression of type
"
)
Charles
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf
Of Jerry Callen
Sent: Monday, April 9, 2018 10:09 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Any C++ regex template class gotchas?
Works for me, using exactly
To clarify, by "works" you mean does NOT ABEND?
Charles
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf
Of David Crayford
Sent: Sunday, April 8, 2018 7:02 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Any C++ regex temp
(CCNETBY ) Level(D171026.Z2R2)
CCN(I) Product(5650-ZOS) Phase(CCNECWI ) Level(D171026.Z2R2)
./test1
RegEx test 4/6/2018
FWIW, it's a good idea to post the compile and link lines along with the source
code, as they can dramatically affect the outcome. Good luck!
-- Jerry
pain.
Nah, the tr1 doesn't bother me. It's like having to code those pesky semicolons
or those pesky double equal signs. It is what it is. My Visual Studio accepts
but does not require the tr1:: for regex. I use Visual Assist and it tends to
autocomplete these things for me anyway, so
those pesky semicolons
or those pesky double equal signs. It is what it is. My Visual Studio accepts
but does not require the tr1:: for regex. I use Visual Assist and it tends to
autocomplete these things for me anyway, so it is little trouble.
I used namespace when I started out in C
of variable definitions by using auto type inference.
#include // bring C stdio runtime into the std namespace
#define __IBMCPP_TR1__ 1
#include
namespace std { using namespace tr1; } // be gone pesky tr1 namespace
struct myRegex
{
std::regex regexObject;
};
int main(int argc, char
On 9/04/2018 8:51 AM, Andrew Rowley wrote:
On 9/04/2018 4:09 AM, Charles Mills wrote:
#include
#define __IBMCPP_TR1__ 1
#include
class myRegex
{
public:
std::tr1::regex regexObject;
};
int main(int argc, char* argv[])
{
printf("RegEx test 4/6/2018\n");
std::
On 9/04/2018 4:09 AM, Charles Mills wrote:
#include
#define __IBMCPP_TR1__ 1
#include
class myRegex
{
public:
std::tr1::regex regexObject;
};
int main(int argc, char* argv[])
{
printf("RegEx test 4/6/2018\n");
std::tr1::regex::flag_type flags = std::tr1::regex
On 9/04/2018 3:18 AM, Jack J. Woehr wrote:
On 4/8/2018 1:04 PM, Charles Mills wrote:
It do. The error message is ABEND=S0C4 U REASON=0004.
Try initializing the regex in the declaration instead of doing it in
main() via pointer-to-reference;
That's not a pointer-to-reference
Works ok for me. The code is sound so I would open a PMR.
On 9/04/2018 2:09 AM, Charles Mills wrote:
#include
#define __IBMCPP_TR1__ 1
#include
class myRegex
{
public:
std::tr1::regex regexObject;
};
int main(int argc, char* argv[])
{
printf("RegEx test 4/6/2018\n")
On 4/8/2018 2:58 PM, Charles Mills wrote:
The pattern is supplied at run time -- as is typical of regex implementations
-- so no number of subclasses solves the problem.
Put the flags in the same scope as the regex and naybe it doesn't blow up.
Either forget about your RegexObject and just
On 4/8/2018 2:58 PM, Charles Mills wrote:
I firmly believe this is a bug, and I do have a workaround, l
I'll betcha it's not a bug, it's something about the flags being out of
scope before the dtor is called for the object.
C++ is, to put it mildly, design-heavy.
You can prove it if you
I'm not "messing" -- .assign() is a documented, public method.
http://www.cplusplus.com/reference/regex/basic_regex/assign/
The pattern is supplied at run time -- as is typical of regex implementations
-- so no number of subclasses solves the problem.
It would conceivably be possib
On 4/8/2018 1:43 PM, Charles Mills wrote:
Thanks, but won't work well in the real code.
Besides, the C++ way to do that is to have subclasses with increasingly
specific ctors for your needs, not mess with a template's internal data
in main().
Betcha if you work on the class design a little
On 4/8/2018 1:43 PM, Charles Mills wrote:
Thanks, but won't work well in the real code.
I just meant as a debugging step. Make it work, then make it break again
and you're home.
--
Jack J. Woehr # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a
Thanks, but won't work well in the real code.
I have multiple instantiations of the same class, and don't know the pattern
until well after the instantiation. Pattern may change after instantiation.
It doesn't take much to make it work. The std::tr1::regex::flag_type flags =
std::tr1::regex
On 4/8/2018 1:04 PM, Charles Mills wrote:
It do. The error message is ABEND=S0C4 U REASON=0004.
Try initializing the regex in the declaration instead of doing it in
main() via pointer-to-reference;
--
Jack J. Woehr # Science is more than a body of knowledge. It's a way
Exception
3 std::tr1::_EBCDIC::basic_regex<char,std::tr1::_EBCDIC::regex
+00C8 2022SANDBOX SANDBOX.C
Call
4 std::
On 4/8/2018 12:09 PM, Charles Mills wrote:
Believe it or not, it appears to be a bug in the C++ runtime. Anyone who
wants to prove me wrong is welcome to try the below. I have tested only on
z/OS V2R2.
No convenient access, but let me guess: blows up in the delete?
Got an error message?
--
Believe it or not, it appears to be a bug in the C++ runtime. Anyone who
wants to prove me wrong is welcome to try the below. I have tested only on
z/OS V2R2.
#include
#define __IBMCPP_TR1__ 1
#include
class myRegex
{
public:
std::tr1::regex regexObject;
};
int main(int argc, char* argv
X-posted to IBM-MAIN and MVS-OE. (The latter seems more appropriate but the
former has more traffic by far.)
I'm trying to use the C++ template class regex for the first time. I have
code that works without any hint of an error on Windows but I am getting a
S0C4 on z/OS when the destructor calls
On Fri, 8 Jan 2016, at 16:25, Paul Gilmartin wrote:
> And, in the "CHANGE string1 string2" command, how can I specify
> a string2 containing an arbitrary mixture of quotation marks,
> apostrophes, and spaces?
c x'xxx' x'yyy'
It's useful to do that in edit macros etc where one has no
On Sat, 9 Jan 2016 12:08:25 +, Jeremy Nicoll wrote:
>
>> And, in the "CHANGE string1 string2" command, how can I specify
>> a string2 containing an arbitrary mixture of quotation marks,
>> apostrophes, and spaces?
>
>c x'xxx' x'yyy'
>
PITA, unless it's driven by a macro. And can
On Fri, 8 Jan 2016 10:25:05 -0600, Paul Gilmartin wrote:
>On Thu, 7 Jan 2016 18:07:11 -0700, Alan Young wrote:
>>
>>The spaces also need the escape backslash like this
>>
>>FIND r'foo\ \'\ bar\ \"\ wombat'
>>
>This is bizarre. I've coded a fair amount of regular expressions and
>I've never
inson
Sent: Friday, January 08, 2016 5:11 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Regex (was: Sort for not there?)
This explanation makes perfect sense. ISPF was written to allow utter maximum
flexibility in command coding. Of course the t appears to stand for 'text'. I
can't try this out
frame Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
> On Behalf Of Bill Godfrey
> Sent: Friday, January 8, 2016 10:59 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: [Bulk] Re: Regex (was: Sort for not there?)
>
> On Fri, 8 Jan 2016 10:25:05 -0600, Paul Gilmartin wrote:
>
On Thu, 7 Jan 2016 18:07:11 -0700, Alan Young wrote:
>
>The spaces also need the escape backslash like this
>
>FIND r'foo\ \'\ bar\ \"\ wombat'
>
This is bizarre. I've coded a fair amount of regular expressions and
I've never needed to escape a blank in a regular expression. In fact,
Single
On Sun, 28 Jul 2013 09:40:43 -0400, Shmuel Metz (Seymour J.) wrote::
o Make the product comfortable to those accustomed to Perl.
o Make the product comfortable to those accustomed to MVS.
In other contexts, I've referred to the options as horizontal and
vertical consistency. ...
And I wonder
On Mon, 29 Jul 2013 10:50:30 -0500, Paul Gilmartin wrote:
And I wonder further, if I have autoconversion enabled, and I'm
processing an ASCII (tagged) file with sed or awk and my
purportedly portable script has \nnn octal escape sequences
to match nondisplayable code points, will those match
Welsh orthography does not figure largely in American 'grammar'---for
which read 'primary'---school curricula.
A more apposite, albeit trite, example is provided by QANTAS, the name
of the Australian flag airline. It was originally an acronym for
'Queensland And Northern
Territories Aerial
-
From: Shmuel Metz (Seymour J.) shmuel+...@patriot.net
To: IBM-MAIN IBM-MAIN@LISTSERV.UA.EDU
Sent: Thu, 11 Jul 2013 2:28
Subject: Re: regex that never matches?
In 0382727397514044.wa.paulgboulderaim@listserv.ua.edu, on
07/10/2013
at 10:47 AM, Paul Gilmartin paulgboul...@aim.com said:
I
I am delighted that a Welsh speaker has put Shmuel straight about the
letter 'q'. I considered trying to do so, but decided that any such
attempt would implicitly misrepresent my knowledge of Welsh as much
more substantial than it is.
John Gilmore, Ashland, MA 01721 - USA
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: regex that never matches?
Shmuel
Just for your information, the Welsh language does not have a 'q' in it.
Nor does it have 'j', 'k', 'v', 'x' or 'z'.
But, we do have many more 'letters' which are combinations of letters, such
examples being 'ch', 'dd
:56
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: regex that never matches?
Shmuel
Just for your information, the Welsh language does not have a 'q' in it.
Nor does it have 'j', 'k', 'v', 'x' or 'z'.
But, we do have many more 'letters' which are combinations of letters,
such examples being 'ch', 'dd
) - try it; you'll get it!
http://www.mackinney.com/products/program-development/simplist.html
Date: Thu, 11 Jul 2013 15:19:39 +0200
From: kees.verno...@klm.com
Subject: Re: regex that never matches?
To: IBM-MAIN@LISTSERV.UA.EDU
With so many 2 character letters, you have an unfair
Welsh is a better example of an MBCS precursor, as in Ralph == 'raf',
but single phonemes represented as digraphs and trigraphs are common
in many languages.
John Gilmore, Ashland, MA 01721 - USA
--
For IBM-MAIN subscribe /
In 9391203323671928.wa.paulgboulderaim@listserv.ua.edu, on
07/09/2013
at 09:56 AM, Paul Gilmartin paulgboul...@aim.com said:
Thanks! I never woulda thoughta that. Seems to work for sed and
grep; nearly an exhaustive sample. Now I need to try to understand
it:
The sequence (? starts an
it was completely incomprehensible what the statement did, but it
worked.
Kees.
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Shmuel Metz (Seymour J.)
Sent: Wednesday, July 10, 2013 03:17
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: regex that never
In 2304481172006741.wa.paulgboulderaim@listserv.ua.edu, on
07/09/2013
at 02:31 AM, Paul Gilmartin paulgboul...@aim.com said:
But is there a general case: a regex that will never match any
string whatever?
Well, (*FAIL) is experimental, but what about (?!)?
--
Shmuel (Seymour J
Ex APL programmer?
snip
This reminds me of an experiment of a colleague of mine, several years ago. He
tried to transform a Rexx program of about one screen of statements into one
Rexx statement, using nesting, recursive programming and other fancy stuff. It
took him about a week, but he
No idea, he is not working here anymore.
Kees.
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Staller, Allan
Sent: Wednesday, July 10, 2013 14:56
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: regex that never matches?
Ex APL programmer
: regex that never matches?
Kind of a programming challenge, in view of all the PCRE chatter hereabouts
lately:
A vendor once supplied an interface where one of the required arguments was a
regex to exclude from processing any matching line. But I wanted every line in
my data processed. So, how
On Wed, 10 Jul 2013 21:33:20 +0800, Peter Stockdill wrote:
I believe that /.^./ or /.$./ both satisfy your requirement.
On Wed, 10 Jul 2013 08:45:17 -0400, John Gilmore wrote:
and he has the right idea. What is needed is a substantive
contradiction, one, say, of the logical form
¬(a | ¬a)
IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
07/10/2013 05:40:22 AM:
From: Vernooij, CP - SPLXM kees.verno...@klm.com
This reminds me of an experiment of a colleague of mine, several years
ago. He tried to transform a Rexx program of about one screen of
statements into
In 0382727397514044.wa.paulgboulderaim@listserv.ua.edu, on
07/10/2013
at 10:47 AM, Paul Gilmartin paulgboul...@aim.com said:
I was taught in grammar school that q occurs only followed by u.
Before the ascendancy of Middle Eastern politics.
Welsh?
--
Shmuel (Seymour J.) Metz,
Kind of a programming challenge, in view of all the PCRE
chatter hereabouts lately:
A vendor once supplied an interface where one of the required
arguments was a regex to exclude from processing any matching
line. But I wanted every line in my data processed. So, how?
For my particular data, I
does
/(?!)/
work for you?
Regards,
Boris
On Tue, July 9, 2013 09:31, Paul Gilmartin wrote:
Kind of a programming challenge, in view of all the PCRE
chatter hereabouts lately:
A vendor once supplied an interface where one of the required
arguments was a regex to exclude from processing
On Tue, 9 Jul 2013 02:31:31 -0500, Paul Gilmartin wrote:
a regex that will never match any string whatever?
oh boy, the number of regex I've written that I couldn't get to match even what
I could see in front of me :0)
Shane
of the null string (which appears between ( and ?). The ( and )
indicate grouping. I have no idea why that's necessary. Perhaps
operator precedence? Would any of /(?!)/, /(?)!/, or even /()?!/ work
alike? Why not?
And, of course, there are many flavors of regex, all with different rules.
Thanks again
not?
And, of course, there are many flavors of regex, all with different rules.
Thanks again,
gil
Adjacent special characters (excludes all other characters) that would
be extremely rare in actual input?
--
Mike A Schwab, Springfield IL USA
Where do Forest Rangers go to get away from it all
(?) copies
of the null string (which appears between ( and ?). The ( and )
indicate grouping. I have no idea why that's necessary. Perhaps
operator precedence? Would any of /(?!)/, /(?)!/, or even /()?!/ work
alike? Why not?
And, of course, there are many flavors of regex, all with different
PM
Subject:regex
Sent by:IBM Mainframe Discussion List IBM-MAIN@listserv.ua.edu
I'm afraid I couldn't persist with the (entire) PCRE thread - my bad.
From my perspective getting *any* regex into our mundane environment is
worthwhile. I can't wait to get the ISPF edit support
Did IBM promise support for regex in ISPF 2.1?
Could you please point me to such announcement?
Thanks
ZA
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message
On Sun, 7 Jul 2013 00:48:07 -0500, Ze'ev Atlas wrote:
Did IBM promise support for regex in ISPF 2.1?
Could you please point me to such announcement?
http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?subtype=cainfotype=anappname=iSourcesupplier=877letternum=ENUSZP13-0013
The ISPF
I'm afraid I couldn't persist with the (entire) PCRE thread - my bad.
From my perspective getting *any* regex into our mundane environment is
worthwhile. I can't wait to get the ISPF edit support in 2.1 - I may even start
doing stuff on z/OS again instead of zLinux. Where I make extensive use
On 6/07/2013 6:56 AM, Shane Ginnane wrote:
I'm afraid I couldn't persist with the (entire) PCRE thread - my bad.
From my perspective getting *any* regex into our mundane environment is
worthwhile. I can't wait to get the ISPF edit support in 2.1 - I may even start
doing stuff on z/OS again
69 matches
Mail list logo