Sha256: 0045c87a3dbe0d3602f0f82fa8d43825729d7cb1671356c09004b8c6046532db

Contents?: true

Size: 995 Bytes

Versions: 10

Compression:

Stored size: 995 Bytes

Contents

//
//  RegexMatch.h
//  snowcrash
//
//  Created by Zdenek Nemec on 5/2/13.
//  Copyright (c) 2013 Apiary Inc. All rights reserved.
//

#ifndef SNOWCRASH_REGEXMATCH_H
#define SNOWCRASH_REGEXMATCH_H

#include <string>
#include <vector>

namespace snowcrash {

    // Perform snowcrash-specific regex evaluation
    // returns true if target string matches given expression, false otherwise
    bool RegexMatch(const std::string& target, const std::string& expression);
    
    // Performs posix-regex and returns first captured group (excluding whole target)
    std::string RegexCaptureFirst(const std::string& target, const std::string& expression);
    
    // Array of capture groups
    typedef std::vector<std::string> CaptureGroups;
    
    // Performs posix-regex
    // returns true if target string matches given expression, false otherwise
    bool RegexCapture(const std::string& target, const std::string& expression, CaptureGroups& captureGroups, size_t groupSize = 8);
}

#endif

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
redsnow-0.2.1 ext/snowcrash/src/RegexMatch.h
redsnow-0.2.0 ext/snowcrash/src/RegexMatch.h
redsnow-0.1.6 ext/snowcrash/src/RegexMatch.h
redsnow-0.1.5 ext/snowcrash/src/RegexMatch.h
redsnow-0.1.4 ext/snowcrash/src/RegexMatch.h
redsnow-0.1.3 ext/snowcrash/src/RegexMatch.h
redsnow-0.1.2 ext/snowcrash/src/RegexMatch.h
redsnow-0.1.1 ext/snowcrash/src/RegexMatch.h
redsnow-0.1.0 ext/snowcrash/src/RegexMatch.h
redsnow-0.0.8 ext/snowcrash/src/RegexMatch.h