Q:

Python regex on phone numbers

I'm using the following regex to match phone numbers (still developing, so not comprehensive):  
\(?\+[\d _\-\.\)\(\+]{8,25}[\d]{1}

When I test it with regex101, or regexpal.com, it matches both +442032398869 and +1 (888) 2572054. 
However, when I run it with my Python script, +442032398869 does not match. Any reason for this, and how may I fix it?
Bonus question: according to my readings, I should have to do as many escapes inside the first character set. Any reason why Python's re throws me an exception if I remove the backslash in front of the . or + for instance?
EDIT:
def get_numbers_in_text(html_string): 
    pattern = r'\(?\+[\d _\-\.\)\(\+]{8,25}[\d]{1}
    reg = re.compile(pattern,re.IGNORECASE) 
    numbers = reg.findall(text) 
    return numbers 

The two numbers are in two different HTML files, so I call the function twice, once for each HTML file / number.

A:

Your regex works:
>>> s = 'blah +442032398869 blah +1 (888) 2572054blah'
>>> re.findall(r'\(?\+[\d _\-\.\)\(\+]{8,25}[\d]{1}', s)
['+442032398869', '+1 (888) 2572054']

Your code indicates that you are trying to match numbers in html text.  Perhaps there is markup separating portions of the number you are trying to match.  Or perhaps the plus symbol is actually a unicode full-width plus (U+FF0B).  Or something else like it.  

