Hi All,
I have this situation, where in data needs to be extracted from inside a bracket. There can be multiple brackets as well.
For eg : [abc-242] jsydg [xuys-285] jyagd [iayb-248] links to [brrwfej-342]
in this case, only data inside the bracket before "links to" needs to be taken. so output should be [iayb-248]
but, some data might be [eqb-231] uajyuvdb [fejo-758] kjahb. in this case, the last bracket needs to taken. ie, [fejo-758].
i tried with .*\[(.*)\] links to.* but it doesn't give desired the output if "Links to" is not present.
I also tried
(?<=\[)([\w-]+?)\]
but it doesn't satisfy the criteria when "Links to" is present.
if anyone could provide a solution which satisfy all the condition, it would be really helpful.
Thanks in advance