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