small step towards reimplementing regexec()
minor changes