Update buffer size for regexp