Grep ( pattern ; text )
Perform simple matching of text lines, similar to the traditional grep tool.
Be the first to rate this function Log in to vote
Chris Irvine - Show more from this author
ipsum cursus elementum.
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Assuming you have a block of text, you may only be interested in processing lines which contain a certain value or phrase, ignoring other lines.
Use the grep function to filter only those relevant lines into a new string. The entire line is retained if the pattern is found anywhere in that line.
Function uses while() instead of recursion, which should support almost any amount of text, though you might need to utilize SetRecursion(). As a result, this function requires v18.0 or higher.
Aug 3, 2022
|See FilterList https://www.briandunning.com/cf/771 for a generalized function that also covers grep -i and -v, etc.|
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.