Changeset 628

Show
Ignore:
Timestamp:
10/05/07 16:55:40 (1 year ago)
Author:
sgrimm
Message:

Allow memcached-tool dump mode to output keys containing punctuation

The regular expression that was being used to match a cache key was treating
colons as word breaks, so it couldn't read keys of the form "type:id".

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/server/scripts/memcached-tool

    r623 r628  
    109109            # return format looks like this 
    110110            # ITEM foo [6 b; 1176415152 s] 
    111             if (/^ITEM (\w+) \[.* (\d+) s\]/) { 
     111            if (/^ITEM (\S+) \[.* (\d+) s\]/) { 
    112112                $keyexp{$1} = $2; 
    113113            } 
     
    118118            print $sock "get $k\r\n"; 
    119119            my $response = <$sock>; 
    120             $response =~ /VALUE (\w+) (\d+) (\d+)/; 
     120            $response =~ /VALUE (\S+) (\d+) (\d+)/; 
    121121            my $flags = $2; 
    122122            my $len = $3;