
23 Aug
2006
23 Aug
'06
10:51 a.m.
Hello, I'm trying to adapt the example script regex_search_example.cpp to do what i want, that is basically search for all the patterns in a file and get their position. I'm trying to match the pattern "test" in a file that called "testfile" that looks like that: ############ file "testfile" this_is _the_file_that_contains_twice_the_word_test_test. ########### ####### In file regex_search_example.cpp i have only changed the line const char* re = "test"; ####### The output looks like that:
Processing file testfile 1 matches found class "" found at position: 56
Class is empty ?? How can i retrive all the patterns and all the positions. I thought the example was supposed to do so ?? Any help would be great. david