![]() If that match fails, we move on to the next word in haystack. In short, we start by comparing the first word in the needle with the first characters in the first word in haystack. If you are curious to know just how this function works, read on… Function Details If you give the function a different name, you will need to change the two calls to that function in the function text above. Don’t forget to add the three parameters listed above in the order listed and name the function FindWordPartsInText. Left ( word Length ( needle ) ) = needle įindWordPartsInText ( RightWords ( needles WordCount ( needles ) - 1 ) haystack 1 )įindWordPartsInText ( needles haystack start + 1 )Īt this point, you can copy and paste the above function and skip to step three if you wish. The function, which I am calling FindWordPartsInText, is as follows: If ( The function will return true if, for each word in needles, there is at least one word in haystack that begins with that word. This will be used to iterate through all the words in the haystack. When calling this function, we would almost always pass the number 1. start: This is a number representing the word within haystack where we will start searching. It will most likely be the contents of one or more fields. ![]()
0 Comments
Leave a Reply. |