If you are not familiar to regular expression and the form will be not broken, then split function may be an easier way.
julia> input = "1-5"
"1-5"
julia> (a,b) = parse.(Int64, (split(input, '-')))
2-element Vector{Int64}:
1
5
julia> collect(a:b)
5-element Vector{Int64}:
1
2
3
4
5