Works with trailing character after * now need to make it work with [ after *