Search and replace text.

Input Fields

  • look in is the full text to start with.
  • look for is the text to search for, or can be a pattern to match using a format called regular expressions. (For more details on search patterns, see Find Pattern.
  • replace with is the text you want to replace it with.
  • all instances - set to True to replace all instances of look for with replace with, or False to replace just the first instance that is found.
  • case sensitive - set to True if the case of look for must be an exact match. If False, then Test would match test, TEST, and tEsT.

Output Fields

  • result text is the resulting text after any replacements are made. If no instances of look for are found, then result text is the same as the input look in you started with.

Examples:

  • If look in is Hello world, look for is Hello, and replace with is Goodbye, then result text is Goodbye world
  • If look in is (206) 555-1234, look for is \d (regular expression for any digit), and replace with is #, and all instances is True, then result text is (###) ###-####
  • If look in is Visa 123456780123, look for is \d{8} (regular expression for 8 digits in a row), and replace with is ########, then result text is Visa ########0123
  • If look in is A*B@C+D, look for is [^\w] (regular expression ^ for not combined with \w for any alphanumeric character), replace with is left empty, and all instances is True, then result text is ABCD