Update 31.0.md

fix memory leak when match nothing;
use realloc not malloc for str_join;