using wildcard search results as part of replace

General comments and questions. Technical support.
Post Reply
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

using wildcard search results as part of replace

Post by DaleDe »

Is it possible to use the results of a wildcard search results in the replace portion? Is it collected in some fashion to be reused? If not then I would like to suggest this change.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

It is done with the “^&” special symbol. Please, have a look at New special characters, and in particular, the special characters that can only be used in the “Replace with” box.
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Here is an example (taken from the attached document).

Let’s suppose that you want to find all bold fragments of text in a document, and reformat them with the non-bold italic attribute.

Target Text:
string 1 normal string 1 string 2 normal string 2 string 3 normal string 3

Find What pattern:
[!^p]{1,}
+ Specific Font Format: bold

Replace With pattern:
^&
+ Specific Font Format: non-bold + Italic

Result:
string 1 normal string 1 string 2 normal string 2 string 3 normal string 3

Note that similar operations can be done with the "Superscript", "Strikeout", "Underline", etc. font formats.

Also, please have a look at the attached document. It contains a number of examples of possible use of regular expressions in Atlantis.

HTH.
Cheers,
Robert
Attachments
Atlantis Regex Library.docx
(90.94 KiB) Downloaded 1946 times
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Re: using wildcard search results as part of replace

Post by admin »

DaleDe wrote:Is it possible to use the results of a wildcard search results in the replace portion? Is it collected in some fashion to be reused?
Please click the following link:

Parentheses () and group backreferences \n
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

Thanks I will look this over.

Dale
Post Reply