Changeset 30735 for main/trunk/greenstone2/bin/script/gti.pl
- Timestamp:
- 2016-08-22T20:44:10+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/gti.pl
r30719 r30735 1622 1622 # So find the first :/= char not preceded by \. That will be the true separator of a chunk_key and its value chunk_text 1623 1623 1624 if ($line =~ m/^(\S*?[^\\])[:|=](.*)$/) { #if ($line =~ /^(\S+?)[:|=](.*)$/) {1624 if ($line =~ m/^(\S*?[^\\])[:|=](.*)$/) { 1625 1625 # Line contains a dictionary string 1626 1626 … … 1659 1659 # So just as in the previous subroutine, find the first (leftmost) : or = char not preceded by \. 1660 1660 # That will be the true separator of a chunk_key and its value chunk_text 1661 $chunk_text =~ s/^(\S*?[^\\])[:|=](\s*)//s; # $chunk_text =~ s/^(\S+)[:|=](\s*)//s;1661 $chunk_text =~ s/^(\S*?[^\\])[:|=](\s*)//s; 1662 1662 1663 1663 $chunk_text =~ s/(\s*)$//s; # Remove any nasty whitespace, carriage returns etc.
Note:
See TracChangeset
for help on using the changeset viewer.