1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
//![initialization]
#include <iostream>
#include <seqan/find.h>
using namespace seqan;
int main()
{
CharString haystack = "Simon, send more money!";
CharString needle = "more";
//![initialization]
//![option]
Finder<CharString> finder(haystack);
Pattern<CharString, Myers<> > pattern(needle);
while (find(finder, pattern, -2))
while (findBegin(finder, pattern, getScore(pattern)))
std::cout << '[' << beginPosition(finder) << ',' << endPosition(finder) << ")\t" << infix(finder) << std::endl;
return 0;
}
//![option]
|