Re: [Clip] Re: Replacing comma with a tab
- janderri wrote:
> I think we can conclude this with :No, most certainly not! I agree, that for someone used to far
> Regular expressions in NoteTab are a mess + we can't even
> trust them to work correctly too.
simpler tools they are quite daunting to begin with, they were for
me. But once started getting used to they are also incredibly
powerful, even when, like by me, only a small subset is used. They
are one of the most helpful bits of NoteTab and I wouldn't miss
What Eric might perhaps consider would be a small extension of the
standard replace function. My good old all-purpose editor Tempus has
two wildcards: *, which is eqivalent to (.*?) and ? which is the
same as (.). Those two would suffice for 80 to 90 % of all Regex
useages without the steep learning curve. On the other hand this
would of course make the deterrent from learning real Regex even
- --- In firstname.lastname@example.org, "janderri" <jan_derrick@...> wrote:
> --- In email@example.com, Axel Berger <Axel-Berger@> wrote:
> > Flo wrote:
> > > "^(.+\t.+?),"
> > A question, as I have never yet used such a complicated term
> > pair of parentheses:there
> > What does the non greedy specifier apply to there exactly and would it
> > make any sense to write (.+?\t.+?) instead? We were never told if
> > could be preexisting tabs anywhere in the source lines.to work correctly too.
> > Danke
> > Axel
> I think we can conclude this with :
> Regular expressions in NoteTab are a mess + we can't even trust them
That's a strange conclusion to reach as a result of this thread...
It is true that the regular expression given here was written making
an assumption that the only tab at the beginning of the data is the
one that was just inserted by replacing the previous ",". However,
that doesn't mean that regular expressions are a mess, or don't
work... it just means there was a poor assumption made in constructing
Thing is, regular expressions are used to tackle problems that are
hard to solve in other ways, and that doesn't mean those problems are
easily solved using regular expressions, either... but often they are
While there are many smart people contributing to this forum, many of
the problems they are attempting to help with are poorly specified.
Even this regular expression is correct, if the assumption made
actually holds; it is unfortunate that assumptions like that sneak in
without being stated... that's a problem with assumptions in general,
though, not just ones regarding regular expressions.