How to remove RegexMatch() in output

filefull="main.cpp"
extension_pattern=r"[^.]+$"
println(match(extension_pattern,filefull))
# answer is RegexMatch("cpp")
#but i need only output word "cpp"

Welcome!

julia> m=match(extension_pattern,filefull)
RegexMatch("cpp")

julia> m.match
"cpp"

julia> println(match(extension_pattern,filefull).match)
cpp
1 Like