I am framing a regex to check if a word starts with http:// or https:// or ftp://, my code is as follows,
http://
https://
ftp://
public
Unless there is some compelling reason to use a regex, I would just use String.startsWith:
bool matches = test.startsWith("http://") || test.startsWith("https://") || test.startsWith("ftp://");
I wouldn't be surprised if this is faster, too.