better regexp for grabbing field names, redux
authorJason Etheridge <jason@esilibrary.com>
Mon, 27 Nov 2017 22:42:16 +0000 (17:42 -0500)
committerJason Etheridge <jason@esilibrary.com>
Mon, 27 Nov 2017 22:42:16 +0000 (17:42 -0500)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>

unicorn/unicorn_to_tsv.pl

index c50c32c..a6cdf47 100755 (executable)
@@ -69,7 +69,7 @@ while (<>) {
 
        # Looks like we've got some actual data!  Let's store it.
        # FIXME: For large batches of data, we may run out of memory and should store this on disk.
-       if ( /^\.(\S+?)\.\s+(\|a)?(.*)$/ ) {
+       if ( /^\.([A-Z0-9_\/]+?)\.\s+(\|a)?(.*)$/ ) {
 
                # Build the name of this field (taking note of whether we're in a named section of data)
                $field = '';