Skip to content

Parity: Find and Replace special characters and wildcards (^p, ^t, ^?, ^#, Use wildcards) #543

Closed

Description

@vangel76

Find and Replace treats ^p, ^t etc. literally. Word's Find/Replace supports special codes and a wildcard mode.

Plan:

  • Special codes in Find and Replace (Special ▾ menu in the dialog): paragraph mark ^p, tab ^t, any character ^?, any digit ^#, any letter ^$, caret ^^, manual line break ^l, manual page break ^m, section break ^b, column break ^n, em/en dash ^+ / ^=, nonbreaking space ^s, nonbreaking hyphen ^~, optional hyphen ^-, white space ^w, "Find what text" ^& (in Replace), clipboard contents ^c (Replace).
  • "Use wildcards" mode: ?, *, [abc], [a-z], [!x], {n,m}, @, <, >, ( ) groups and \1 back-references in Replace.
  • Match case / whole words / prefix / suffix / ignore punctuation / ignore white-space options where not yet there.
  • Engine: edit.find / edit.replace params (special, wildcards, …) so agents get the same; Replace with ^p splits paragraphs.
  • Tests per code family and wildcard grouping/back-references; hostile patterns bounded (no catastrophic backtracking).

I'm working on this (vangel76); PR follows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions