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