we have regular expressions in vl. What the? Here is the gist:
vvvv beta comes with the RegExpr (String) which is quite handy but doesn't cover all cases. vux provides a RegExpr (String Replace) via the addonpack, which adds the "replace" case, but there is more. So let's see what we got in shop for vvvv gamma:
The simplest case: Just figure out if a given string matches a given pattern:
Sometimes a simple replace by string is not enough. See this example where we're stripping a string of all occurences of html-tags, ie. replacing them with nothing.
Sometimes a split by string is not enough. See this example where we're splitting a string by any multiple occurances of lowercase letters:
Find all substrings that match a given pattern. Imagine a string that contains many dates written in the format "Month Day, Year" and you want to get all of those:
The last pin on all of the above nodes is the Options enum pin. Since this enum allows multiple selections (ie. a bitwise combination of its member values), there is a RegexOptions node that allows you to set multiple of the options at the same time:
The above should cover most typical usecases. But regular expressions can do even more. Luckily with vl you're not restricted to what we decide to provide for you, but you have direct access to the full set of functionality .NET regular expressions offer. For example there are situations where you want to use the static operations that .NET provides instead of the process nodes shown above. If so, simply choose "Advanced" in the nodebrowser and, navigate to the "Regex" type and choose the static operations from there...
Available for testing in latest alphas now!
@cyril interesting, haven't seen this page before. where do you see the advantages of it over regex101?
@tonfilm there is a graphic explanation of the regular expression (instead of a textual explanation on regex101)
ah, thanks for that. it appears after you entered the regex, that's why i didn't see it before. they do a good job visualizing the expression. thanks for the link!
anonymous user login