/*************************************************/ /* regex.cpp */ /*************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /*************************************************/ /* Source code within this file is: */ /* (c) 2007-2010 Juan Linietsky, Ariel Manzur */ /* All Rights Reserved. */ /*************************************************/ #include "regex.h" #include "nrex.hpp" #include "core/os/memory.h" void RegEx::_bind_methods() { ObjectTypeDB::bind_method(_MD("compile","pattern"),&RegEx::compile); ObjectTypeDB::bind_method(_MD("match","text","start","end"),&RegEx::match, DEFVAL(0), DEFVAL(-1)); ObjectTypeDB::bind_method(_MD("get_capture","capture"),&RegEx::get_capture); ObjectTypeDB::bind_method(_MD("get_capture_list"),&RegEx::_bind_get_capture_list); }; StringArray RegEx::_bind_get_capture_list() const { StringArray ret; int count = get_capture_count(); for (int i=0; i