]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/regex.cpp
added some makefiles (untested)
[wxWidgets.git] / src / common / regex.cpp
index dcd016f2724f3bb8934f7970c70de53ebbf7c6ef..ec57e48df32774eefab98fefbf2b947d09705e59 100644 (file)
@@ -315,6 +315,15 @@ bool wxRegEx::GetMatch(size_t *start, size_t *len, size_t index) const
     return m_impl->GetMatch(start, len, index);
 }
 
+wxString wxRegEx::GetMatch(const wxString& text, size_t index) const
+{
+    size_t start, len;
+    if ( !GetMatch(&start, &len, index) )
+        return wxEmptyString;
+
+    return text.Mid(start, len);
+}
+
 int wxRegEx::Replace(wxString *pattern, const wxString& replacement) const
 {
     wxCHECK_MSG( IsValid(), -1, _T("must successfully Compile() first") );