Python regex example
Question: If I want to replace a pattern in the following statement structure:

    
    
    cat&345;
    bat &#hut;
    

I want to replace elements starting from `&` and ending before (not including
`;`). What is the best way to do so?


Answer: Here is a good regex  
`import re  
result = re.sub("(?<=\\&).*(?=;)", replacementstr, searchText)`  
Basically this will put the replacement in between the `&` and the `;`

