Incorrect regular expression accepted by Oxygen
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Wed Apr 18, 2007 10:55 am
Incorrect regular expression accepted by Oxygen
Hi!
I have just notice that one of my regular expression (used with pattern) was incorrect. I would expect to get an error from Oxygen (or at least from the XML Schame Regular Expressions Builder).
My pattern was the following:
In another view:
You can see that I have on ( in more. Is it normal that I did not get an error?
I heard that the XMLSpy software raised an error message for that. Why not Oxygen? I am using version 7.2
Thx in advance for your answer.
I have just notice that one of my regular expression (used with pattern) was incorrect. I would expect to get an error from Oxygen (or at least from the XML Schame Regular Expressions Builder).
My pattern was the following:
Code: Select all
((([^0][1]?[0-9]{0,2}|2([0-4]?[0-9]{0,1}|5[0-5]?))\.){0,3})(([^0][1]?[0-9]{0,2}|2([0-4]?[0-9]?|5[0-5]?)))/(3[0-2]|[1-2]?[0-9]))
Code: Select all
(
(
(
[^0][1]?[0-9]{0,2}
|2
(
[0-4]?[0-9]{0,1}
|5[0-5]?
)
)\.
){0,3}
)
(
(
[^0][1]?[0-9]{0,2}
|2
(
[0-4]?[0-9]?
|5[0-5]?
)
)
)/
(
3[0-2]
|[1-2]?[0-9]
)
)
I heard that the XMLSpy software raised an error message for that. Why not Oxygen? I am using version 7.2
Thx in advance for your answer.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
The last character, that is '(' is not matched by a previous ')' character. It is not useful in the expression and the regular expression can be parsed so it is ignored instead of reporting an error.
Regards,
Sorin
The last character, that is '(' is not matched by a previous ')' character. It is not useful in the expression and the regular expression can be parsed so it is ignored instead of reporting an error.
Regards,
Sorin
-
- Posts: 2
- Joined: Wed Apr 18, 2007 10:55 am
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
We will consider generating a warning for characters that are added at the end of an expression that can be parsed without error and that do not change the expression.
Regards,
Sorin
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re:
Post by sorin_ristache »
Hello,
Regards,
Sorin
I just wanted to let you know that the error checking in regexp patterns entered in the Schema Regexp Builder tool is more strict now. In your case it marks the ')' character in the regular expression when you click on the error label in the regexp builder dialog. You can try the new error checking starting with version 10.be_tnt wrote:You meant that the last ')' is ignored because there is not a corresponding '(', right?
Should not Oxygen generate a Warning, at least?
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service