Thread View: news.software.readers
3 messages
3 total messages
Started by OB1
Sat, 09 Aug 2003 20:30
[Dialog] regular expression error?
Author: OB1
Date: Sat, 09 Aug 2003 20:30
Date: Sat, 09 Aug 2003 20:30
25 lines
1986 bytes
1986 bytes
Hi,
having some problem with the regular expressions in Dialog.
I use reg.expressions in my scoring file, to score posts by subject prefix.
It looks to me like the regular expression check isn't working completely
as it should.
It gives a match on words in the middle of a string,if they are directly
behind a bracket (opening and closing alike), while it should only check
the first word.
For example(in the reg exp tester)
with the reg exp ^test:
i do a test on "test: this is a test"
this gives a match only on the first 'test', like it should
if you put a bracket before 'test' in the middle of the line, like this
"this is a )test" or "this is a (test"
then it gives a match on 'test', where it shouldn't.
Is this an error in the evaluation of regular expressions, or am i getting
it wrong?
--
OB1
Re: [Dialog] regular expression error?
Author: Juergen Haible
Date: Sun, 10 Aug 2003 06:55
Date: Sun, 10 Aug 2003 06:55
14 lines
1478 bytes
1478 bytes
OB1:
> It gives a match on words in the middle of a string,if they are directly
> behind a bracket (opening and closing alike), while it should only check
> the first word.
> [...]
> Is this an error in the evaluation of regular expressions, or am i getting
> it wrong?
It's an error, looks like embedded "(" and ")" are somehow treated as
line boundaries.
-jh-
Re: [Dialog] regular expression error?
Author: Marcus Mรถnnig
Date: Mon, 11 Aug 2003 19:28
Date: Mon, 11 Aug 2003 19:28
20 lines
1990 bytes
1990 bytes
On Sun, 10 Aug 2003 08:55:35 +0200, Juergen Haible wrote:
>> It gives a match on words in the middle of a string,if they are directly
>> behind a bracket (opening and closing alike), while it should only check
>> the first word.
>> [...]
>> Is this an error in the evaluation of regular expressions, or am i getting
>> it wrong?
>
> It's an error, looks like embedded "(" and ")" are somehow treated as
> line boundaries.
Yep. Fixed it for Beta 29.
Marcus
--
No replies in private e-mail, please, unless explicitly requested!
Please log bug reports into Mantis: http://www.40tude.com/dialog/mantis/
Please share your scripts and tips: http://www.40tude.com/dialog/wiki/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads