FindReplace Method (Article)

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 17:07

Description

In the current text replaces str1 with str2, using options, specified in str3.

Available in Ted and Fred.

Syntax

object.FindReplace str1, str2, str3, bNewSearch

object

Required. Object name. Returned by Ted.GetActiveArticle.

str1        

text string to be searched

str2

substitution string

str3

options for the retrieval:

U[+/-] = activates/deactivates case sensitivity

G[+/-] = activates/deactivates retrieval in entire

B[+/-] = activates/deactivates retrieval backwards

S[+/-] = activates/deactivates retrieval inside selection

T[+/-] = activates/deactivates jump of the cursor on found element

W[+/-] = activates/deactivates whole word match

P[+/-] = activates/deactivates replacement without the confirmation

A[+/-] = activates/deactivates replacement of all the occurrences

bNewSearch

Required. Boolean parameter that indicates if starting a new search in the article (true) or continue the previous one (false).

Return value

Error code

Remarks

In Fred, it acts only on the text elements which are linked to the current page. If a text element of an article is linked to some other page. e.g. jump page, or it's not linked to any page, this function ignores it.

Example

Ted.GetActiveArticle.FindReplace "tera", "TeraDP", "B-", false

Context

Article object

See also

Find, DoFindRepl, FindNext