+ is a special character. You can use brackets to specify a range of characters, which is better than using an "or" with the pipe character in this case.:
regex = r'([+-])?\d*\.?\d*'
Otherwise, you just need to escape it in your original version:
regex = r'(\+|-)?\d*\.?\d*'
Using the r is the preferred way of specifying a regex string in python because it indicates a raw string, which should not be interpreted and reduces the amount of escaping you must perform with backslashes. It is just a python regex idiom you will see everywhere.
r'(\+|-)?\d*\.?\d*'
#'(\\+|-)?\\d*\\.?\\d*'