regular expression get string between 2 characters code example Example: get everything between two characters regex (?<=\[)(.*?)(?=\])