Pattern::expand
fn expand(P pat, string template) -> string Import
Source: use text::{Pattern}; src/text.hy Returns the replacement text for the match find_in just returned.
The default is template itself. A regex substitutes its captures
($1, ${name}).
Parameters#
| Name | Type |
|---|---|
pat | P |
template | string |
Returns#
string
See also#
Pattern::find_inPattern: Something a [Searchable] value can be searched for: a plainstring(matched literally), or a type such as coil-regex’sRegex.Pattern::is_prefix_of: Returnstruewhen a match starts at the beginning ofhay.Pattern::is_suffix_of: Returnstruewhen a match ends at the end ofhay.