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