UPDATE:
Based on the comments below and the comment in the question about R2 format, the modified regex would be:
((\($\d+\.\d{2}\))|($\d+\.\d{2}))
OLDER ANSWER:
Try this regex:
\$\s*\(?\d+(\.\d+)?\)?
\$
- matches the dollar symbol
\s*
- matches any white space betn the dollar symbol and the digits or brace
\(?
- matches the optional left brace
\d+
- matches the integral part of the number
(\.\d+)?
- matches the optional decimal portion with the dot
\)?
- matches the optional right brace
So you can try this xsd validator:
<xs:simpleType name="CurrencyFormat">
<xs:restriction base="xs:string">
<xs:pattern value="\$\s*\(?\d+(\.\d+)?\)?" />
</xs:restriction>
</xs:simpleType>