Skip to contentSkip to conversation

Remove archaic use of regex capture \1 in favour of $1

PATCH New Nick Woolley 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Remove archaic use of regex capture \1 in favour of $1

Using it will generate a perl warning "\1 better written as $1".

---
 git-cvsexportcommit.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
git-cvsexportcommit.perl +1 -1
index a36df33..d509468 100755
@@ -299,7 +299,7 @@ foreach my $f (@files) {
 	while (<FILTER_IN>)
 	{
 	    my $line = $_;
-	    $line =~ s/\$([A-Z][a-z]+):[^\$]+\$/\$\1\$/g;
+	    $line =~ s/\$([A-Z][a-z]+):[^\$]+\$/\$$1\$/g;
 	    print FILTER_OUT $line;
 	}
 	close FILTER_IN;
Signature · 1 line
1.6.3.3