3 This file is part of libmspstrings
4 Copyright © 2007 Mikko Rasa
5 Distributed under the LGPL
7 #include <msp/core/error.h>
14 RegMatch::RegMatch(const string &str, const GroupArray &g):
17 for(GroupArray::iterator i=groups.begin(); i!=groups.end(); ++i)
20 i->length=i->end-i->begin;
21 i->str=str.substr(i->begin, i->length);
25 const RegMatch::Group &RegMatch::group(unsigned i) const
28 throw InvalidParameterValue("Group index out of range");