Detect String Between Python Function Example With Variables On Both Sides