Forum Discussion

simonaferrara's avatar
simonaferrara
Frequent Contributor
2 years ago
Solved

Search for a substring using wildcards

Hi,   I would like to search a substring within a string that contains some values that change at runtime. My string is, for example: "Result Id: n=3;i=916169501" I'm not interested to check the...
  • simonaferrara's avatar
    2 years ago

    I post the solution found with the help of mikef , that works!

     

    Using aqString.StrMatches to compare the structure, using regex. For example : 

     

      inputString = "Result Id: n=3sdfsdf;i=9161634395asdf01"
      
      returnValue = aqString.StrMatches("Result Id: n=.*;i=.*",inputString)
      
      Log.Message(returnValue)