0

Search for words (not sequencial) in a string

Hi All,

 

I need to create a search field where I put two or more words on a string and try to find it in a query result. The problem is that with the "like" I could add more than one word but they need to be in the width order otherwise I don't have any kind of result. There is some functions that could find two words not sequencial in a string ? Or some code to do that? Thanks

1 reply

null
    • John_Halls
    • 2 mths ago
    • Reported - view

    Hi 

    This bit of code searches the multiple words b in the text a and returns yes or no if all the words in b are in a. Bear in mind it is case sensitive.

    let a := "words to search for"
    let b := "search words";
    let c := split(b," ");
    let d := true;
    for e in c do
       d := d and contains(a,e)
    end;
    d
    

    Regards John

Content aside

  • 2 mths agoLast active
  • 1Replies
  • 36Views
  • 2 Following