Changeset 17512


Ignore:
Timestamp:
2008-10-09T14:44:09+13:00 (14 years ago)
Author:
kjdon
Message:

added a method to turn windows filename paths (with single back slash) into a form suitable for use in a regular expression (with double backslash)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/util.pm

    r17204 r17512  
    594594}
    595595
     596sub filename_to_regex {
     597    my $filename = shift (@_);
     598
     599    # need to put single backslash back to double so that regex works
     600    if ($ENV{'GSDLOS'} =~ /^windows$/i) {
     601    $filename =~ s/\\/\\\\/g;
     602    }
     603    return $filename;
     604}
    596605
    597606sub filename_cat {
Note: See TracChangeset for help on using the changeset viewer.