Hello, I have a text string variable tha reads: "PLEASE LOAD TABLE 1394, SAME RATE AS TABLE 276." Like this variable, there are other instances of unstructured data in this field. My working thought is to create keywords for the column to extract from the text. In this example, TABLE is the keyword. I would like to extract "Table 1394" into one variable and "Table 276" into another. I've worked with Index, Scan, and find with varied results, but I am finding myself getting further away from my desired result. 😞 if find(lowcase(txtstring),'table') >0 then table='table'; do i=1 to countw(txtstring," "); if scan(lowcase(txtstring),i," ")=table then do; after=strip(scan(txtstring,i+1," ")); end; end; output; end; this produces only the first iteration of table: table after table 276 Any guidance is greatly appreciated.
... View more