ae.utils.regex

std.regex helpers

Members

Aliases

extractCapture
alias extractCapture = extractCaptures
Undocumented in source.

Functions

applyRE
string applyRE(string str, string transformation)

Apply regex transformation (in the form of "s/FROM/TO/FLAGS") to a string.

buildReplaceTransformation
string buildReplaceTransformation(string search, string replacement, string flags)

Build a RE search-and-replace transform (as used by applyRE).

convertCaptures
void convertCaptures(C captures, T values)
Undocumented in source. Be warned that the author may not have intended to support it.
escapeRE
string escapeRE(string s)

Take a string, and return a regular expression that matches that string exactly (escape RE metacharacters).

extractCapture
auto extractCapture(S s, R r)
Undocumented in source. Be warned that the author may not have intended to support it.
matchAllCaptures
size_t matchAllCaptures(S s, R r, Ret delegate(Args args) fun)

Call a delegate over all matches.

matchCaptures
bool matchCaptures(S s, R r, Ret delegate(Args args) fun)

Match into a delegate.

matchInto
bool matchInto(S s, R r, Args args)

Lua-like pattern matching.

re
Regex!char re()

Allows specifying regular expression patterns in expressions, without having to compile them each time.

Templates

extractCaptures
template extractCaptures(T...)

Returns a range which extracts a capture from text.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <vladimir@thecybershadow.net>