Lets say i have this string §cHi there
I want to use regex to match §c so I can extract the message.
The way I want it to work is it looks for § and then match the next and the previous character.
So far I am able to match the next character by this expression [§].{1}.
My question is how to match the privious character which is Â.
First match
.[§]., then take the first and third character of the match.Note: your example regex
[§].{1}is the same as[§]..matches any character (sometimes with the exception of the newline character)