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