I got random text by crawling but, i have to remove all value in bracket
like this
string = "I(have[to]re(m[ov]e)all)value(in)[bracket]"
to string = "Ivalue"
cause i should remove value in bracket for all of crawled string, i got an index data for "[("
and "])"
in single bracket case, it works well.
but with double or triple bracket case, it did not worked well.
my code is like this
for i in range(len(contents_re[0])):
for j in range(len(trash_index[i][0])-1):
if trash_index[i][0][j+1] < trash_index[i][1][j]:
trash_index_re[i][0].append(trash_index[i][0][j])
trash_index_re[i][1].append(trash_index[i][1][j+1])
elif trash_index[i][0][j+1] > trash_index[i][1][j]:
trash_index_re[i][0].append(trash_index[i][0][j])
trash_index_re[i][1].append(trash_index[i][1][j])
from index data (trash_index[i][0] = contains "([" index data.)
i tried to find final index(trash_index_re "([()])blah()" -> ( )blah())