I have a pattern that findall the tags in this format, <.* :.*> . From nested tags, I am taking only the child tag. Here I need to distinguish the brackets(< and >) from '/<' and '/>'. Is there any way that I can do this in the same pattern itself?
eg : input string
<testing this> any text </<this is not a tag>any text<this will fail/>>
output:
['<testing this>','</<this is not a tag>','<this will fail/>>']
Any suggestion please let me know.