◄Macro Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Programmer's WorkBench───────────────────────────────────────────────── The Replace function performs a find-and-replace operation on the current file, prompting for find-and-replacement strings. Replace substitutes all matches of the search pattern without prompting for confirmation. See: Qreplace Replace («replace») Performs the replacement from the cursor to the end of the file, wrapping around the end of the file if the Searchwrap switch is on. See: Searchwrap Arg <boxarg> │ <linearg> │ <streamarg> Replace («arg» <boxarg> │ <linearg> │ <streamarg> «replace») Performs the replacement over the selected area. NOTE: PWB does not adjust the selection at each replacement for changes in the length of the text. For boxargs and streamargs, PWB may replace text that was not included in the original selection or miss text included in the original selection. Arg mark Replace («arg» mark «replace») Performs the replacement on text from the cursor to the specified mark. It searches the range of text as if it were selected, according to the current selection mode. The <mark> argument cannot be a line number. Arg number Replace («arg» number «replace») Performs the replacement over the specified number of lines, starting with the current line. Arg Arg ... Replace («arg» «arg» ... «replace») As above except using regular expressions. Meta ... Replace («meta» ... «replace») As above except the sense of the Case switch is reversed for the operation. Returns True: At least one replacement was performed. False: String not found, or invalid pattern. See ◄Regular Expressions► See Qreplace, Searchwrap -♦-