I’ve been asked to convert some code from Matlab to Julia, and I am stuck right at the beginning with some Regex issues
I want the equivalent of
file_name = dir(‘A*.mmode’)
file_name = {file_name.name}
In Matlab, this will make me a matrix of however many files with the appropriate start and end bits.
I saw the following code to search for files:
searchdir(path,key) = filter(x->occursin(key,x), readdir(path))
But when I run
julia> file_name = searchdir(pwd(),^(A.+iq.mmode)$)
ERROR: syntax: invalid identifier name “.”
Any suggestions?