RegExpT.opApply

Set up for start of foreach loop.

class RegExpT(char_t)
int
opApply
(
int delegate
(
RegExpT!(char_t)
)
dg
)

Return Value

Type: int

Instance of RegExpT set up to search input.

Examples

import tango.io.Stdout;
import tango.text.Regex;

void main()
{
    foreach(m; Regex("ab").search("qwerabcabcababqwer"))
        Stdout.formatln("{}[{}]{}", m.pre, m.match(0), m.post);
}
// Prints:
// qwer[ab]cabcababqwer
// qwerabc[ab]cababqwer
// qwerabcabc[ab]abqwer
// qwerabcabcab[ab]qwer

Meta