Let Reg Explain
I make those kind of mistakes. Would this do it?:
[^\w]t\.co$
Websites with domain names containing 't.co' were knackered in Russia today as a result of the Kremlin throttling Twitter. In an attempt to punish the American social network, Russian telecoms regulator Roskomnadzor said on Wednesday access to the service would be slowed on the country's networks. "In order to protect Russian …
Although DNS is case insensitive, whatever you are using to piss around may not be.
Perhaps something like this: /^http?s://t\.co/[.*]/i The capture group gives you the content part of the URL.
Ideally go in with a Grok pattern: https://logz.io/blog/logstash-grok/ Regex is hard, use tools to make it easier.
Can you use a port with t.co? You can add that to the pattern, or alternatively use your favourite language's URL library: Java's java.net.URL
class will parse the URL and then you call the getHost()
method to retrieve just the hostname, which you can compare with a fixed string. Other methods will give you the other parts of the URL if you're interested.
Where is that army of Russian hackers when you need them?
Whenever Telegram is mentioned as a target for censure I'm left wondering why Whatsapp is no target for the ire of the state even though it (unlike Telegram) implements end to end encryption by default. What is facebook doing to appease Turkey, Russia, et al that Telegram isn't?
Or could it be Telegram's public group functionality?