Skip to main content
August 29, 2023
Question

How can we compare two text values

  • August 29, 2023
  • 3 replies
  • 0 views

Hi All,

How can we compare two text values

for example "batting" is text1 and "bat" is text2

if batting compare with bat then it should write True. because bat word is there in batting word

Is there any logic for this ?

    3 replies

    August 29, 2023
    anmolv0003
    August 29, 2023

    Logic for find() function as suggested by Purvaja

    a!localVariables(
      local!x: find("bat", "batting"),
      if(local!x <> 0, true, false()),
    )

    You can also use search() or searchb() funtions for the same in place of find() function.

    mathieud0001
    August 29, 2023

    One thing to note is that find() is case sensitive while search() is case insensitive depending on what your use case may be.