int rfind(rchar[] string, char[] pattern, char[] attributes = null)
|
Search string for the last match with pattern with attributes. Returns the index in string of the match if found, -1 if no match.
Example:
import std.stdio;
import std.regexp;
int main() {
char[] str = "I think next Tuesday is Sarah's birthday.";
int index = rfind(str,"[A-Z][a-zA-Z']*");
if(index != -1) {
writefln("Index: %d",index);
}
else {
writefln("Not found");
}
return 0;
}
|
Output:
|