On the text i have used reg exp - with it, i can match all struc - endstruc that don't contain elem text. However, i can't transform it to condition that it does contain.
some text is here ble bla blu
now there is some
elem xsxsx
struc something
now we are inside and next element:
elem value
elem
something els, and again
elem val2
end struc
this is not inside
elem valXXX
struc
asasas
end struc
some text is here ble bla blu
now there is some
elem xsxsx
struc something
now we are inside and next element:
elem value
something els, and again
elem val2
end struc
this is not inside
elem valXXX
struc
asasas
end struc
struc
elem xpo
end struc
sdffdsd
struc something
now we are inside and next element:
elem value
something els, and again
elem val2
end struc[b]
struc
asasas
end struc[/b]
struc
elem xpo
end struc
It was too greedy. The bold part should not be returned.
some text is here ble bla blu
now there is some
elem xsxsx
struc something
now we are inside and next element:
elem value
something els, and again
elem val2
end struc
this is not inside
elem valXXX
struc
asasas
end struc
struc
elem xpo
end struc
sdffdsd
struc something
now we are inside and next element:
elem value
something els, and again
elem val2
end struc[b]
struc
asasas
end struc[/b]
struc
elem xpo
end struc
It was too greedy. The bold part should not be returned.
struc something
now we are inside and next element:
elem value
something els, and again
elem val2
end struc
struc
asasas
end struc
struc
elem xpo
end struc