Forum Discussion

kroe761's avatar
kroe761
Contributor
10 years ago

Actually find an asterisk using the Find() method? Not use it as a wildcard?

I am testing some software that adds entries to a table.  I need to find and delete all entries marked as "*".  Problem is, If I do something like this




props = ["ObjectType","innerText"]


values = ["Cell","*"]

cell = table.Find(props, values, 1000)



The * searches everything.  I need to actually find the asterisk.  How can I do that?  I tried doing "\*" but that didn't work.  That is the extent of my regex abilities.  Thanks!

  • marin's avatar
    marin
    Frequent Contributor
    Hello Kevin,



    maybe you could try searching for ASCII value:





    props = ["ObjectType","innerText"]

    values = ["Cell", Chr(42)]

    cell = table.Find(props, values, 1000)





    or





    var asterisk = Chr(42);

    props = ["ObjectType","innerText"]

    values = ["Cell", asterisk]

    cell = table.Find(props, values, 1000)





    Did not try myself, just a thought...



    Marin