Ruby regular expressions (regex for short) let us find specific patterns inside strings, with the intent of extracting that data for further processing. Two common use cases for regular expressions are validation and parsing. For example, think about an email address, with regular expressions we can define what a valid email address looks like. That […]

Read More

Regular expressions, regexp for short, allow us to build expressions for pattern matching. If you aren’t familiar with them you may want to check out some resources here. In Java you can leverage the power of regexp using the pattern and matcher classes, you can import java.util.regex.* to make them available to your program. Let’s […]

Read More

Time for a bit more sorting. Today our task is to sort an array of file names based on the numeric value. This what the array looks like:

If you try a simple sort it won’t come out as you expect…

Ruby sort by value This is not what we want, so we […]

Read More