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