Why does the following regex not match the last occurrence of the search word? (?i)(^|,|\s*old\s*($| This matches the first and second old, but not the third: One,old;Two,old;old ^ ^ ^ match match \_ no match However, if I remove the last ; ((?i)(^|,|\s*old\s*$), it does match the last occurrence. P.S. I'm using Python. Continue reading...