Regex in search/replace
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 7
- Joined: Thu Jan 26, 2006 4:26 pm
Regex in search/replace
Hi,
first let me use this occasion to thank you guys from the Oxygen team for this great tool. I'm discovering a new life-easier-making feature almost every day.
I'm wondering if it's possible to use the regex option in the search/replace function to do things like transform groups or characters into upper case. I have been trying this for a little while now without success. What kind of syntax to I have to use?
Thanks,
Oli
first let me use this occasion to thank you guys from the Oxygen team for this great tool. I'm discovering a new life-easier-making feature almost every day.
I'm wondering if it's possible to use the regex option in the search/replace function to do things like transform groups or characters into upper case. I have been trying this for a little while now without success. What kind of syntax to I have to use?
Thanks,
Oli
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
You have to enable the Regular expression checkbox of the Find/Replace dialog. In the Text to find combo insert a Perl 5 regular expression and in the Replace with combo you can use regular expression groups like $1, $2, etc. For example to replace the tag with attributes called tag-name with the tag tag-name1 use as text to find <tag-name(\s+)(.*)> and as replace text <tag-name1$1$2>
Regards,
Sorin
You have to enable the Regular expression checkbox of the Find/Replace dialog. In the Text to find combo insert a Perl 5 regular expression and in the Replace with combo you can use regular expression groups like $1, $2, etc. For example to replace the tag with attributes called tag-name with the tag tag-name1 use as text to find <tag-name(\s+)(.*)> and as replace text <tag-name1$1$2>
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
You can use expressions like \p{Lower} and \p{Upper} for matching lower case letters and upper case letters if you enable the case sensitive and regular expression options but you cannot transform lower case to upper case using the replace with expression. The constructs supported as regular expressions are described here.
Regards,
Sorin
You can use expressions like \p{Lower} and \p{Upper} for matching lower case letters and upper case letters if you enable the case sensitive and regular expression options but you cannot transform lower case to upper case using the replace with expression. The constructs supported as regular expressions are described here.
Regards,
Sorin
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