Product Documentation
Virtuoso Layout Suite XL: Basic Editing User Guide
Product Version IC23.1, November 2023

Replace Functionality

The search operation finds the objects that have a property that matches the search criteria you specify. You can replace the search results of an object with a new object, attribute value, or property value. In the Replace section of the Find/Replace form, you can specify the value of the property with which you want to replace the original value. The value specified replaces the property values of all the objects matching the search criteria. For example, to replace parameter values for a parameterized cell, set the replace criterion to property and specify the parameter name in the replace field. You can use Add Criteria to add a line of fields to the form that lets you make the replace operation more specific.

You can use partial strings and wildcard characters in the replace field. The following table describes their usage.

Replace String-Tagged Characters Description

{n}

Interprets n as an integer from 1 to 9. Tagged fields correspond to * or . or [c..] or .* in the search string. The first nine wildcard characters in the search pattern are tagged. If a tagged field that is used in the replace string does not exist, it is replaced by a NULL string.

*nth “*”

Interpreted as {n}, n ranging from 1 to 9. If more than nine wildcard characters exist in the search string and more than nine *'s in the replace string, the system substitutes the first nine *'s in the replace string with the corresponding nine tagged fields from the search string. The remaining *'s in the replace string are substituted with a NULL string.

The following table lists some examples of find and replace expressions using partial strings and wildcard characters.

If wildcard characters appear together in a sequence in the find string, each corresponds to a different tag except when . and * appear together, in that order. In such cases, wildcard characters are treated together as one tag. If the find string does not have a wildcard character and the replace string does, a substitution is not achieved.
Example Find Expression Replace Expression

Replace I0, I1, I2, …I10 with M1, M2, …M10

I*

M* or M{1}

The {1} tag or * in the replace string corresponds to the characters represented by the first asterisk in the find string.

Swap the start and end values of strings with prefix ABC

ABC<*:*>

ABC<{2}:{1}>

The {2}and {1} tags in the replace string correspond to the characters represented by the second and first asterisk in the find string, respectively.

Replace PN, PN_, PN_IN with PIN, PIN_, PIN_IN

PN*

PIN* or PIN{1}

Replace AfooB , AblahB with PfoofooQ, PblahblahQ, respectively.

A*B

P{1}{1}Q

Replace AxyzB with CxD

A.*[x-z]B

C*D

The * in the replace string is interpreted as the first tagged field, which is the “.” wildcard.

C***D or C{1}{2}{3} will yield CxyzD.

Replace AxyzB with CxyD

A.*[x-z]B

C*D

The * in the replace string is interpreted as the first tagged field in the find string, which is the sequence " .* ".  C**D or C{1}{2} yields CxyzD.

Replace A.B with A*B

A*B or A.B

A\*B

Replace A[1], A[2], A[3] with A{1}, A{2}, A{3}

A\[*] or A\[[0-9]]

A\{{1}} or A\{*}

The \ before the first { in the replace string treats the { as a literal and not as a tagged field.
To learn about find and replace functionality enhancements, watch the video, Find/Replace Enhancements.

Related Topics

Replacing Instances

Finding and Replacing Text of Labels

Object Search Criteria

Find Functionality


Return to top
 ⠀
X