blob: 17edfb40e65dfa57ba863cc2c934528b2cab0836 [file] [log] [blame]
Alexander Gutkin0d4c5232013-02-28 13:47:27 +00001// Copyright 2008 The RE2 Authors. All Rights Reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
Ian Hodson2ee91b42012-05-14 12:29:36 +01005#include <re2/re2.h>
6#include <re2/filtered_re2.h>
7#include <stdio.h>
8
9using namespace re2;
10
11int main(void) {
12 FilteredRE2 f;
13 int id;
14 f.Add("a.*b.*c", RE2::DefaultOptions, &id);
15 vector<string> v;
16 f.Compile(&v);
17
18 if(RE2::FullMatch("axbyc", "a.*b.*c")) {
19 printf("PASS\n");
20 return 0;
21 }
22 printf("FAIL\n");
23 return 2;
24}