Hello everyone,
I apologise for the burden of this question, as I understand Regular Expressions are some "Knights who say Ni!" serving you at the local tax office (or asking for a beer at the bar, I guess) .
I'm looking for a match from an array
var a = aafList.split("/").slice(-1).join("/").split(".").shift()
a = BBC HD audio sync test
- this is what I'm looking for
if I do this:
var getVideoFile = videoFilePath.filter(x => x.match(/(BBC HD audio sync test)\.(mov|mp4|mxf)$/i))
I get my path.
How do I replace the "BBC HD audio sync test" in the regular expression with variable a ?
or aafList.split("/").slice(-1).join("/").split(".").shift()
, will be as good.
Thank you so much!
- samuel henriques @samuel_henriques
Got it!!
var getVideoFile = videoFilePath.filter(x => x.includes(a))
Thank you
Dustin Harris @Dustin_Harris
BTW, somewhat related, I found this great site that helps you test your regex!
https://regex101.com/r/3UOewQ/8