Skip Menu |

This queue is for tickets about the Regexp-Wildcards CPAN distribution.

Report information
The Basics
Id: 122388
Status: open
Priority: 0/
Queue: Regexp-Wildcards

People
Owner: Nobody in particular
Requestors: wenshuai.guo [...] ericsson.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: a discuss with wildcards
Date: Fri, 7 Jul 2017 09:35:14 +0000
To: "bug-Regexp-Wildcards [...] rt.cpan.org" <bug-Regexp-Wildcards [...] rt.cpan.org>
From: Wenshuai Guo <wenshuai.guo [...] ericsson.com>
Hi, Vincent: First , thanks for your contribution, The module is helpful. I find a bug when use the module. [The SW version] Regexp-Wildcards-1.05 Perl v5.22.1 Ubuntu16.04 and window7 The Description: There are string 'abs123456' used for test. When do match by pattern '123' on wildcards mode. It shouldn't be matched in my opinion. It should only match the string '123' when wildcards. There are example for wildcards application, the 'find' command on linux. Wildcard 't' just match the file 't'. [cid:image002.jpg@01D2F747.6222C430] So, I think if convert wildcards 't' to regexp, it should be '^t$'. Please reply me if you receiving the report,. BR/Wenshuai
Download image002.jpg
image/jpeg 33.3k
image002.jpg
Le Ven 07 Jui 2017 05:51:01, wenshuai.guo@ericsson.com a écrit : Show quoted text
> Hi, Vincent: > > First , thanks for your contribution, The module is helpful. > > I find a bug when use the module. > > [The SW version] > Regexp-Wildcards-1.05 > Perl v5.22.1 > Ubuntu16.04 and window7 > > The Description: > There are string 'abs123456' used for test. > When do match by pattern '123' on wildcards mode. It > shouldn't be matched in my opinion. It should only match the string > '123' when wildcards. > > There are example for wildcards application, the 'find' command on > linux. Wildcard 't' just match the file 't'. > [cid:image002.jpg@01D2F747.6222C430] > > So, I think if convert wildcards 't' to regexp, it should be '^t$'. > > Please reply me if you receiving the report,. > > BR/Wenshuai
Hello! Thanks for your interest in this module. When I wrote this module a long time ago, I really did not have a 1-1 compatibility with "find" in mind. So when I had to decide whether the resulting regexps had to be anchored, I only thought about usability in Perl. Since it's much easier to add the anchors rather than remove them, I decided to omit them. You can always do something like $regexp = "^${regexp}\$" to add them back. That said, adding an "anchored => 1" parameter to the constructor that automatically adds the anchors doesn't seem like a bad idea. Vincent
Subject: RE: [rt.cpan.org #122388] a discuss with wildcards
Date: Wed, 19 Jul 2017 02:14:17 +0000
To: "bug-Regexp-Wildcards [...] rt.cpan.org" <bug-Regexp-Wildcards [...] rt.cpan.org>
From: Wenshuai Guo <wenshuai.guo [...] ericsson.com>
Hi, Vincent: Good idea. Though omit anchors is usable most of the time, it is really necessary to add an "anchored => 1" parameter. Thanks for your reply. BR/Wenshuai Show quoted text
-----Original Message----- From: Vincent Pit via RT [mailto:bug-Regexp-Wildcards@rt.cpan.org] Sent: 2017年7月18日 19:56 To: Wenshuai Guo <wenshuai.guo@ericsson.com> Subject: [rt.cpan.org #122388] a discuss with wildcards <URL: https://rt.cpan.org/Ticket/Display.html?id=122388 > Le Ven 07 Jui 2017 05:51:01, wenshuai.guo@ericsson.com a écrit :
> Hi, Vincent: > > First , thanks for your contribution, The module is helpful. > > I find a bug when use the module. > > [The SW version] > Regexp-Wildcards-1.05 > Perl v5.22.1 > Ubuntu16.04 and window7 > > The Description: > There are string 'abs123456' used for test. > When do match by pattern '123' on wildcards mode. It > shouldn't be matched in my opinion. It should only match the string > '123' when wildcards. > > There are example for wildcards application, the 'find' command on > linux. Wildcard 't' just match the file 't'. > [cid:image002.jpg@01D2F747.6222C430] > > So, I think if convert wildcards 't' to regexp, it should be '^t$'. > > Please reply me if you receiving the report,. > > BR/Wenshuai
Hello! Thanks for your interest in this module. When I wrote this module a long time ago, I really did not have a 1-1 compatibility with "find" in mind. So when I had to decide whether the resulting regexps had to be anchored, I only thought about usability in Perl. Since it's much easier to add the anchors rather than remove them, I decided to omit them. You can always do something like $regexp = "^${regexp}\$" to add them back. That said, adding an "anchored => 1" parameter to the constructor that automatically adds the anchors doesn't seem like a bad idea. Vincent