Sha256: 174f2a5a934231ff395eff05dce0c84531118a664c17a339ccb7f000b92dbc0e

Contents?: true

Size: 983 Bytes

Versions: 15

Compression:

Stored size: 983 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

15 entries across 15 versions & 2 rubygems

Version Path
redsnow-0.4.4 ext/drafter/ext/snowcrash/src/RegexMatch.h
lounge_lizard-0.1.4 ext/drafter/ext/snowcrash/src/RegexMatch.h
lounge_lizard-0.1.3 ext/drafter/ext/snowcrash/src/RegexMatch.h
lounge_lizard-0.1.2 ext/drafter/ext/snowcrash/src/RegexMatch.h
lounge_lizard-0.1.1 ext/drafter/ext/snowcrash/src/RegexMatch.h
lounge_lizard-0.1.0 ext/drafter/ext/snowcrash/src/RegexMatch.h
redsnow-0.4.3 ext/drafter/ext/snowcrash/src/RegexMatch.h
redsnow-0.4.1 ext/drafter/ext/snowcrash/src/RegexMatch.h
redsnow-0.4.0 ext/drafter/ext/snowcrash/src/RegexMatch.h
redsnow-0.3.7 ext/snowcrash/src/RegexMatch.h
redsnow-0.3.4 ext/snowcrash/src/RegexMatch.h
redsnow-0.3.3 ext/snowcrash/src/RegexMatch.h
redsnow-0.3.2 ext/snowcrash/src/RegexMatch.h
redsnow-0.3.1 ext/snowcrash/src/RegexMatch.h
redsnow-0.3.0 ext/snowcrash/src/RegexMatch.h