Find/Replace: Regular expression and XML-aware mode
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 96
- Joined: Wed Feb 09, 2005 8:57 am
Find/Replace: Regular expression and XML-aware mode
Suppose I have this XML document opened in Text mode
and want to find and highlight the value of @bar that starts with 'b'; namely "bar baz" of the 2nd @bar.
I opened the Find/Replace dialog and set these options:
What's the correct syntax to accomplish the task?
Code: Select all
<e>
<e bar="foo bar" />
<e bar="bar baz" />
<e baz="baz qux" />
</e>
I opened the Find/Replace dialog and set these options:
- Find: ^b.*
- XPath: @bar
- Enable [Regular expression]
- Enable [Enable XML search options] and [Attribute values]
What's the correct syntax to accomplish the task?
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Find/Replace: Regular expression and XML-aware mode
HI,
This doesn't work because Oxygen always treats "^" as the line start, not a region start.
You can work around this with zero-width negative lookbehind:
Find: (?<!.)b.*
Regards,
Adrian
This doesn't work because Oxygen always treats "^" as the line start, not a region start.
You can work around this with zero-width negative lookbehind:
Find: (?<!.)b.*
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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