RegEx

REGEX

Regex or Regular Expression is a way to use patterns to define a search. Usually this pattern is used by string searching algorithms for “find” or “find and replace” operations on strings, or for input validation. While it may sound complex, it isn’t as hard as it sounds and can give you a great deal of control when you need to refine content you have.

https://regex101.com/

On this page you can see the pattern explanation on the lower right. Seeing an actual application might help you understand the kind of power nestled in here:

Let’s say you have a Filename - EG . XXX030_03_05_BreakingAway_30.wav

And you need to pull the Source information from the Filename which in this case is ‘XXX030_03_03.’ Here’s where Workflows comes in: We need to define a pattern that identify two groups - one we want to keep and one we want to discard. Use workflows to “Find and Place” and we then need to check to use REGEX. The expression would be:

(.+?.+?.+?)(_.*)

To dissect it, it is two groups separate by what is inside the rounded brackets. The first group Is .+?.+?.+? which translates to ‘Match as few characters as possible up to the first _ then as few characters up to the second underscore and then…The next group…is defined as anything beyond and including the third underscore..

Replace Contents of source with the first match $1 (first group) and the Source will be automatically filled correctly after picking RUN:

And following our standard for the Source field has the added benefit of automatically properly filling the Volume, Track and Index track

© 2020 Soundminer Inc.