There are two reasons why Regular Expressions (Regex) are important in coding competitions. They are categorized as medium-level difficulty and, as such, they carry fairly heavy point weightings. Also, they typically require minimal amount of code. Yet most teams skip these problems because they can be time consuming unless your team is well versed on the topic.
To get a good handle on Regex, follow along on the videos below.
The "Learn Regex in 20 Minutes" video offers an excellent introduction to the topic. The material will only sync in if you follow along with the instructor. To do this, you will need to go to the regexr.com site and do the problems as he does them.
The other video shows how to use Regex inside a java program using the Pattern, Compile and Matcher classes. Note that you can use basic Regex in java by using the replaceAll() method instead of the replace() method to process/alter simple Strings. However, using these classes provides a more flexible way of implementing Regex in Java.
After working through these videos, go on to the practice site that is linked below the videos. Finally try your hand at some of the practice problems located at the bottom of this page.
Do the Special Treament problem from the 2022 Lockheed Martin Packet.
This problem can be solved without using Regex by using the Character.isDigit() and Character.isLetter() methods. But your job is to get some practice with Regular Expressions by using Regex to solve this problem.
Do the Best Sensor problem from the 2020 Lockheed Martin Packet.
Do the Anti Asteroid Weapon problem from the 2021 Lockheed Martin Packet.
Try to use the Pattern and Matcher Java Library classes to help solve this problem.