Quick Start
Tutorial
Tools & Languages
Examples
Reference
Book Reviews
RegexBuddy Instantly and accurately analyze and test any replacement string with RegexBuddy. Save yourself the headache of figuring out the differences between replacement string flavors. RegexBuddy knows all the search-and-replace features and replacement string flavors listed in this reference. RegexBuddy also explains and emulates many more subtle differences and idiosyncrasies that are omitted here to keep this reference readable. Get your own copy of RegexBuddy now

Replacement Strings Reference Table of Contents

Introduction

The introduction explains how to read the replacement strings reference tables.

Literal Characters, Special Characters, and Non-Printable Characters

The simplest replacement text consists of only literal characters. Certain characters have special meanings in replacement strings and have to be escaped. Escaping rules may get a bit complicated when using replacement strings in software source code. Non-printable characters such as control characters and special spacing or line break characters are easier to enter using control character escapes or hexadecimal escapes.

Matched Text and Backreferences

Reinserting the entire regex match into the replacement text allows a search-and-replace to insert text before and after regular expression matches without really replacing anything. Backreferences to named and numbered capturing groups in the regular expression allow the replacement text to reuse parts of the text matched by the regular expression.

Match Context and Case Conversion

Some applications allow you to insert the subject string or the part of the subject string before or after the regex match. Some applications can insert the text matched by the regex or by capturing groups converted to uppercase or lowercase.

Make a Donation

Did this website just save you a trip to the bookstore? Please make a donation to support this site, and you'll get a lifetime of advertisement-free access to this site!

Replacement Reference
Introduction
Table of Contents
Characters
Matched Text & Backreferences
Context & Case Conversion
Regular Expressions Reference
More on This Site
Introduction
Regular Expressions Quick Start
Regular Expressions Tutorial
Replacement Strings Tutorial
Applications and Languages
Regular Expressions Examples
Regular Expressions Reference
Replacement Strings Reference
Book Reviews
Printable PDF
About This Site
RSS Feed & Blog