Opened 2 years ago

Last modified 5 months ago

#78 accepted defect

Regular expression engine won't properly match beginning of lines

Reported by: Alfredo Fernández Díaz Owned by: Gregg Young
Priority: major Milestone: Release_1.1
Component: eFTE core Version: Release_1.0
Keywords: Regular expression, regex, line anchoring Cc: Alfredo Fernández Díaz, abwillis

Description

Regular expression anchoring for beginning of line fails, apparently since 2008.

Finding "^$" as a regular expression should match empty lines (it does in FTE/2006) but in eFTE2 (also FTE/2008) it fails and instead matches lines that are 1-character long.

Also, "^." should match the first character of every non-empty line, but matches the second one instead.

Change History (7)

comment:1 Changed 2 years ago by Alfredo Fernández Díaz

Keywords: expression line anchoring added; expreesion empty lines removed

comment:2 Changed 2 years ago by Alfredo Fernández Díaz

Cc: Alfredo Fernández Díaz added

comment:3 Changed 2 years ago by abwillis

Cc: abwillis added
Using Find and selecting regexp and putting in "^$" without the quotes[[BR]]
does not appear find anything here.
Create fold by regexp and putting in "^$" does create folds at each blank[[BR]]
line here.
For some reason I had to use code blocks to get the ^ to show.
Last edited 2 years ago by abwillis (previous) (diff)

comment:4 in reply to:  3 Changed 2 years ago by Alfredo Fernández Díaz

Replying to abwillis:

Using Find and selecting regexp and putting in "^$" without the quotes
does not appear find anything here.

Exactly. It works in FTE/2006.

Create fold by regexp and putting in "^$" does create folds at each blank
line here.

Which is very interesting -- maybe it's not the regexp engine that got broken but perhaps how it's used internally.

For some reason I had to use code blocks to get the ^ to show.

Took me a while to figure out when I first posted here. It's the goddamn wiki parser assuming everything is non-literal.

If you read http://trac.netlabs.org/efte/wiki/WikiFormatting carefully you'll see at some point:

Notes: [...] ! tells wiki parser to not take the following characters as wiki format [...]

comment:5 Changed 2 years ago by Gregg Young

What are the file dates for the 2006 and 2008 fte.exe?

comment:6 Changed 2 years ago by Alfredo Fernández Díaz

FTE/2006 has timestamp 26/01/06, 18:35, is 472496 bytes long, and can be downloaded from http://hobbes.nmsu.edu/download/pub/os2/apps/editors/fte20060126.zip

FTE/2008 has timestamp 04/02/08, 20:51, is 468320 bytes long, and can be downloaded from
http://hobbes.nmsu.edu/download/pub/os2/apps/editors/fte-03-02-08.zip

comment:7 Changed 5 months ago by Gregg Young

Owner: set to Gregg Young
Status: newaccepted
Note: See TracTickets for help on using tickets.