commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject Re: Proposed Contribution to Apache Commons,
Date Wed, 30 Sep 2015 14:58:34 GMT
Hi,

On 09/30/2015 01:44 AM, Jochen Wiedmann wrote:
> Hi, Norman,
>
> On Tue, Sep 29, 2015 at 10:06 PM,  <norm@dad.org> wrote:
>
>> My colleague Jeff Rothenberg and I, retirees, have developed an alternative to
>> using regular expressions for searching for (and optionally replacing)
>> patterns in text.
Something that is more fluid and can communicate the semantics of the operation as it is written
would be nice.
> I admit that I am becoming somewhat cautious by reading about "an
> alternative"
Agree - most regular expression engines seem to be battled tested fairly well.  I think the
complex part of regular expressions is building it and interpreting it, so if something helps
with that, thumbs up!

>   to one of the best researched and understood parts of the
> theory of computer science, namely regular expressions.
>
> We know exactly, how powerful regexes are. And we also know exactly,
> what they can't do.
Regular expressions remind me of  punch cards.  If you know what you are doing, and have invested
the time to prove that what the expression is doing is what it's supposed to be doing, it's
great. However reading, rationalizing, and testing:

|^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[13-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$
Can be tricky. So if there's a more fluid way to build and communicate what the above sequence
is doing, that would be awesome. |


>
> Regarding your work, we don't even know how it would look like.
Perhaps if some simple examples were posted on the mailing list the developers here could
get a better feel for it.

> Because, frankly, docs are quite sparse. And, what I found
> (SimpleExamples.java) looks to me more like a different API to
> creating regexes, rather than an alternative. And, why bother about
> that? I never felt it to be painful to specify a regex in text.
Honestly I feel the pain here.   I have been close to slipping into a coma several times while
analysing a regular expression.  We all know programmers make mistakes ( Not me :) ), even
in simple situations occasionally, so given how complex some regexs can get...

Cheers,
- Ole

>   Did so
> as a Perl programmer, as an Apache programmer (initially with Oro, and
> the like) and nowadays as a Java programmer.
>
> Sorry, but unless you come up with compelling reasons, I am -0 to -1.
>
> Jochen
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message