Migrating regular expressions to metadata