Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re: Tk broken by regexp fail #974

Closed
p5pRT opened this issue Dec 18, 1999 · 2 comments
Closed

Re: Tk broken by regexp fail #974

p5pRT opened this issue Dec 18, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 18, 1999

Migrated from rt.perl.org#1921 (status was 'resolved')

Searchable as RT1921$

@p5pRT
Copy link
Author

p5pRT commented Dec 18, 1999

From nick@ing-simmons.net

The problem seems to be the (^|[\/\\]) - loosing the ^| from the group i.e.

  my ($name) = $path =~ m#(?​:[\/\\])([\w-]+)(?​:\.\w+)$#;

  print "'$name'\n";

Does the expected - provided of course that there is a / or \ in the string.

Note that this is with multiplicity _ON_

Multiplicity does not affect the problem.

--
Nick Ing-Simmons

@p5pRT
Copy link
Author

p5pRT commented Dec 18, 1999

From [Unknown Contact. See original ticket]

Nick Ing-Simmons <nick@​ing-simmons.net> writes​:

The problem seems to be the (^|[\/\\]) - loosing the ^| from the group i.e.

my ($name) = $path =~ m#(?​:[\/\\])([\w-]+)(?​:\.\w+)$#;

print "'$name'\n";

Does the expected - provided of course that there is a / or \ in the string.

Note that this is with multiplicity _ON_

Multiplicity does not affect the problem.

This patch adds tests for the expected behaviour.

Inline Patch
--- t/op/re-tests.ship	Sat Dec 18 11:24:59 1999
+++ t/op/re-tests	Sat Dec 18 11:22:13 1999
@@ -748,3 +748,6 @@
 '\.c(pp|xx|c)?$'i	IO.c	y	-	-
 '(\.c(pp|xx|c)?$)'i	IO.c	y	$1	.c
 ^([a-z]:)	C:/	n	-	-
+'(?:^|[\/\\])([\w-]+)(?:\.\w+)?$'	t/widget.t	y	-	-
+'(?:^|[\/\\])([\w-]+)(?:\.\w+)?$'	widget.t	y	-	-
+'(?:[\/\\])([\w-]+)(?:\.\w+)?$'	t/widget.t	y	-	-



-- 

Nick Ing-Simmons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant