From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:5c0e:: with SMTP id i14mr73141849qti.328.1609810264091; Mon, 04 Jan 2021 17:31:04 -0800 (PST) X-Received: by 2002:a25:6ec3:: with SMTP id j186mr111624702ybc.165.1609810263922; Mon, 04 Jan 2021 17:31:03 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!goblin1!goblin.stu.neva.ru!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 4 Jan 2021 17:31:03 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=146.5.17.100; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.17.100 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Easiest way to use redular expressions? From: Shark8 Injection-Date: Tue, 05 Jan 2021 01:31:04 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:61031 List-Id: > OK, I assume it somehow breaks the philosophy on Ada and security/reliabi= lity. Could someone therefore show a better and more simple way to do this?= gnat.expect?=20 >=20 > reinert In my career, about 90% of the paid programming has been maintenance. As such, any time RegEx comes up, I am almost filled with dread: RegEx is t= errible, overly limited, often part of a system that easily evolves beyond = the constraints that are implied with RegEx (that of being a "regular langu= age"). -- I would go so far as to even advise things like "compiler recogni= zers" *not* use RegEx. I've found that an actual parsing system is far preferable to RegEx. In Byr= on, parsing is trivial: I : Integer renames Integer'Wide_Wide_Value( This_Value ); Where "This_Value" is the string in question. Is it cheating to use the 'Value Attribute? Possibly, but this also provide= s for consistency between 'Value and the associated integer-value.