RegEx.sub

Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as $1 and $name are expanded and resolved. By default, only the first instance is replaced, but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be.

struct RegEx
@nogc nothrow const
String
sub
(
in String subject
,
in String replacement
,
in bool all = false
,
in long offset = 0
,
in long end = -1
)

Meta