I want to get the text in square bracket which contains the pipe character.
For example from:
"ERROR|appLogger|[File|name|upload<failed on server:5645>]Execution Failed[check server address][com.package.file.upload]"
I want to extract:
"File|name|upload<failed on server:5645>"
Edit: Small correction to catch stuff like
[|]as well.Try this:
See it in action here.