I want to check with regex if the word link appears twice in a sentence.
The sentence goes: "This link is invalid. Try the link below." --> here I need the regex to check if "link" appears twice.
This is my first time trying regex and I only understood the grouping so far like \b(link)\b
. With this I can check if the word link even appears but I need to know if it appears twice.
How can I achieve this?