Category: Regex

  • fail2ban installation and configuration notes

    A couple of days ago one web site I volunteer to manage was under DDOS attack. I installed and configured fail2ban to protect us from future similar attacks. Here are some notes. The server is the RedHat/Fedora/CentOS variety, as you can tell from commands listed below. Please translate them to your distro’s corresponding commands as […]

  • Java regex Matcher’s first group is the whole pattern

    I didn’t realize that Java’s regex class, Matcher, uses to denote the entire pattern. I spent some time debugging it. Hence this note. As is stated in the documentation, “Capturing groups are indexed from left to right, starting at one. Group zero denotes the entire pattern, so the expression is equivalent to” […]