Bug 18536: [QA Follow-up] Tiny regex simplification
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 19 May 2017 09:39:24 +0000 (11:39 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 19 May 2017 14:41:39 +0000 (10:41 -0400)
Simplify regex for removing table name.
No need to escape a dot between the square brackets. No need to specify a
number of 1 between parentheses.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
serials/lateissues-export.pl

index 0bd82a6..e36e734 100755 (executable)
@@ -57,7 +57,7 @@ while ( $content =~ /
     $header =~ s/^\s+|\s+$//g; # Trim whitespaces
     push @headers, $header;
 
-    $field =~ s/[^\.]*\.{1}//; # Remove the table name if exists.
+    $field =~ s/[^.]+\.//; # Remove the table name if exists.
     $field =~ s/^\s+|\s+$//g; # Trim whitespaces
     push @fields, $field;
 }