D
D
Dmitry Krapivin2018-08-28 17:27:28
Database design
Dmitry Krapivin, 2018-08-28 17:27:28

What regular expressions should I use for numbers, floating point numbers, and numbers with a logical operator in the XSD schema?

Input object height data (meters):
<0.05
0.05
0.1
0.2
...
5
7
8
9
10
>10
Sample code

<xs:simpleType name="ВысотаОбъекта">
    <xs:restriction base="xs:string">
        <xs:pattern value=".......регулярные выражения???"/>
    <xs:documentation>&lt;0,05<xs:documentation/>
    <xs:documentation>0,05<xs:documentation/>
    <xs:documentation>0,1<xs:documentation/>
    <xs:documentation>0,2<xs:documentation/>
    <xs:documentation>...<xs:documentation/>
    <xs:documentation>9<xs:documentation/>
    <xs:documentation>10<xs:documentation/>
    <xs:documentation>=&gt;11"<xs:documentation/>
    </xs:restriction>
</xs:simpleType>

Alternatively:
[0.05-70]|comparison operator and number??? - but I can't figure out how to specify that a number can go with an operator or a floating point number can go with an operator.
Question:
That is . input integers, floating point numbers, logical operators with integers, logical operators with a floating point number.
Can you please tell me which regular expression is suitable for processing the specified data?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question