Find - Find a substring inside a string

Return to Introduction  Previous page  Next page

find  $variable,stringToSearch,stringToFind[,start]

Where:

$variablereceives the position, relative to 1, where stringToFind first appears in stringToSearch. If the string is not found, $variable contains 0 (zero).
stringToSearchthe string to be searched. Enclose stringToSearch in double quotation marks ("") if it contains embedded spaces or commas.
stringToFindthe string to find in stringToSearch.        Enclose stringToFind in double quotation marks ("") if it contains embedded spaces or commas.        
startan optional parameter that specifies the position, relative to 1, within stringToSearch where the find operation should begin.        

 

stringToSearch, stringToFind and start may be variables.

The find command finds a string within another string and returns the position of the found string in a variable.

 

Examples

find$Position,"The quick brown fox",fox
find$Position,$string1,$string2,10
find $Position,$SCREEN,Login:

 


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.