A regex pattern that matches all forms of integers and decimal numbers in Python
Your expression looks just fine, maybe we would slightly modify that to:
^[+-]?((\d+(\.\d+)?)|(\.\d+))$

for failing these samples, 3., 4., for instance, just in case maybe such samples might be undesired. Other than that, you have some capturing groups that I'm guessing you'd like to keep those.

Test the capturing groups with re.finditer
import re

regex = r&quot;^[+-]?((\d+(\.\d+)?)|(\.\d+))$&quot;

test_str = (&quot;0.00000\n&quot;
    &quot;0.00\n&quot;
    &quot;-200\n&quot;
    &quot;+200\n&quot;
    &quot;200\n&quot;
    &quot;200.2\n&quot;
    &quot;-200.2\n&quot;
    &quot;+200.2\n&quot;
    &quot;.000\n&quot;
    &quot;.1\n&quot;
    &quot;.2\n&quot;
    &quot;3.\n&quot;
    &quot;.&quot;)

matches = re.finditer(regex, test_str, re.MULTILINE)

for matchNum, match in enumerate(matches, start=1):
    
    print (&quot;Match {matchNum} was found at {start}-{end}: {match}&quot;.format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))
    
    for groupNum in range(0, len(match.groups())):
        groupNum = groupNum + 1
        
        print (&quot;Group {groupNum} found at {start}-{end}: {group}&quot;.format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))


Test with re.findall
import re

regex = r&quot;^[+-]?((\d+(\.\d+)?)|(\.\d+))$&quot;

test_str = (&quot;0.00000\n&quot;
    &quot;0.00\n&quot;
    &quot;-200\n&quot;
    &quot;+200\n&quot;
    &quot;200\n&quot;
    &quot;200.2\n&quot;
    &quot;-200.2\n&quot;
    &quot;+200.2\n&quot;
    &quot;.000\n&quot;
    &quot;.1\n&quot;
    &quot;.2\n&quot;
    &quot;3.\n&quot;
    &quot;.&quot;)

print(re.findall(regex, test_str, re.MULTILINE))

The expression is explained on the top right panel of this demo, if you wish to explore/simplify/modify it, and in this link, you can watch how it would match against some sample inputs step by step, if you like.

RegEx Circuit
jex.im visualizes regular expressions: