blog.iankulin.com

Regex

Recursive list of files in Linux

After migrating a media library from an external USB drive to a NAS and reorganising it, I needed a way to verify no files were missed in the move. I walk through building a Linux command-line pipeline using find, grep with regex, and cut to recursively list media files while filtering out directories, metadata, and unwanted filenames. I then feed the resulting clean listing into a spreadsheet for comparison against the original drive...

Regex to split a string with two different characters

A walkthrough of using Swift 5.7’s regex support as the separator argument to String.split(), in order to parse a string like “Some behaviour (expectation)” into its two parts. I build the expression up step by step, covering escaping of brackets and spaces and the use of the pipe for OR, and note that the Playgrounds app doesn’t yet support Swift 5.7...