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
test.matches() method checks all text.use test.find()