Hi, I am trying to set the pattern dynamically but its not working. Could you please provide me an example?