|Anonymous | Login | Signup for a new account||2018-10-19 21:58 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001082||Documentation, Examples, and Web Site||Writing with Inform||public||2013-02-24 12:14||2014-05-07 07:38|
|Target Version||Fixed in Version||6L02|
|Summary||0001082: Match given for regular expression is incorrect.|
|Description||"19.6. Regular expression matching" says this.|
"This condition is true if any contiguous part of the text can be matched against the given regular expression. Examples:
if "taramasalata" matches the regular expression "a.*l", ...
is true, since this looks for a part of "taramasalata" which begins with "a", continues with any number of characters, and finishes with "l"; so it matches "asal". The option "case insensitively" causes lower and upper case letters to be treated as equivalent.".
However, the regular expression doesn't match "asal", it matches "aramasal".
|Minimal Source Text To Reproduce|
"Test" After looking: if "taramasalata" matches the regular expression "a.*l", say the text matching regular expression; say line break. The Testing Room is A Room.
|Tags||No tags attached.|
Confirmed. (The code's behavior is correct, because .* is a greedy match, as noted later.)
Just to be clear: changing the pattern to "a.*?l" -- the non-greedy version -- does not change the result. This is still correct, because matches go from left to right. Once you match the first "a", there's only one way to reach the "l".
(This confused me at first, but it's the way Perl works.)
|2013-02-24 12:14||climbingstars||New Issue|
|2013-02-24 14:11||zarf||Note Added: 0001983|
|2013-02-24 14:11||zarf||Assigned To||=> graham|
|2013-02-24 14:11||zarf||Status||new => confirmed|
|2013-02-24 14:17||zarf||Note Added: 0001984|
|2014-01-25 09:28||graham||Status||confirmed => resolved|
|2014-01-25 09:28||graham||Resolution||open => fixed|
|2014-05-07 07:37||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:38||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|