
Regular Expressions
How to Convert Glob Patterns to Regex Without Surprises
Convert glob patterns to regex: what star and question mark mean, the recursive form, escaping dots, conversion rules and library helpers.
6 min read
Tag
3 posts

Convert glob patterns to regex: what star and question mark mean, the recursive form, escaping dots, conversion rules and library helpers.

Use the date command to print formats, convert epoch seconds, add and subtract days, set time zones and name files by timestamp in real scripts.

Convert tabs, spaces and commas between delimiters with tr, sed, awk, expand and unexpand, and see which methods break on quoted fields or repeated spaces.