Update name regex to support all supported locales.
--HG-- branch : develop
This commit is contained in:
parent
0467033855
commit
c79c4ed256
|
@ -42,7 +42,7 @@
|
|||
</xs:element>
|
||||
<xs:simpleType name="shortName">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\"]){1,1}([^*/^+\-=\s()?%:;!.,`'\"]){0,}$"/>
|
||||
<xs:pattern value="^([^\p{Nd}\p{Zs}*/&|!<>^\-()–+−=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^\-()–+−=?:;\"]){0,}$"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="formatVersion">
|
||||
|
|
|
@ -475,7 +475,7 @@
|
|||
</xs:element>
|
||||
<xs:simpleType name="shortName">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\"]){1,1}([^*/^+\-=\s()?%:;!.,`'\"]){0,}$"/>
|
||||
<xs:pattern value="^([^\p{Nd}\p{Zs}*/&|!<>^\-()–+−=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^\-()–+−=?:;\"]){0,}$"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="units">
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</xs:element>
|
||||
<xs:simpleType name="shortName">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\"]){1,1}([^*/^+\-=\s()?%:;!.,`'\"]){0,}$"/>
|
||||
<xs:pattern value="^([^\p{Nd}\p{Zs}*/&|!<>^\-()–+−=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^\-()–+−=?:;\"]){0,}$"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="units">
|
||||
|
|
|
@ -93,8 +93,11 @@ QT_WARNING_DISABLE_GCC("-Wattributes")
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline QString NameRegExp()
|
||||
{
|
||||
//Same regexp in pattern.xsd shema file. Don't forget synchronize.
|
||||
return QStringLiteral("^([^0-9*/^+\\-=\\s()?%:;!.,`'\"]){1,1}([^*/^+\\-=\\s()?%:;!.,`\"]){0,}$");
|
||||
//Same regexp in pattern.xsd shema file. Don't forget to synchronize.
|
||||
// \p{Nd} - \p{Decimal_Digit_Number}
|
||||
// \p{Zs} - \p{Space_Separator}
|
||||
// Note. All three minus characters are different!
|
||||
return QStringLiteral("^([^\\p{Nd}\\p{Zs}*/&|!<>^\\-()–+−=?:;'\"]){1,1}([^\\p{Zs}*/&|!<>^\\-()–+−=?:;\"]){0,}$");
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
Loading…
Reference in New Issue
Block a user