summaryrefslogtreecommitdiff
path: root/src/tests/regex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/regex.cpp')
-rw-r--r--src/tests/regex.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/tests/regex.cpp b/src/tests/regex.cpp
deleted file mode 100644
index 376fbb2..0000000
--- a/src/tests/regex.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#include <bu/regex.h>
9#include <stdio.h>
10
11int main( int argc, char *argv[] )
12{
13 if( argc < 3 )
14 {
15 printf("No... %s <regex> <string>\n\n", argv[0] );
16 return 0;
17 }
18
19 Bu::RegEx re( argv[1] );
20
21 printf("Regex: %s\n", argv[1] );
22 printf("Match: %s\n", argv[2] );
23
24 if( re.execute( argv[2] ) )
25 {
26 for( int j = 0; j < re.getNumSubStrings(); j++ )
27 {
28 printf("SubStr %d: %s\n", j, re.getSubString( j ).getStr() );
29 }
30 }
31 else
32 {
33 printf("Regex did not match.\n");
34 }
35
36 return 0;
37}
38