I am trying to use the find function in a case where both string parameters passed to it contain double quotes. In doing this, I discovered the following problem: Passing a TRIM'ed string to the FIND function is not sufficient to make it work (the c1 variable below is wrong). However using the trim option ('t') of the FIND function will give the desired results (the c2 variable below is correct). Can someone explain to me why this is happening? Code: data test; a = "lalala""example""lalala"; b = trim(cat("""","example","""")); c1= find(a,b,'t'); c2 = find(a,b); Result: a = lalala"example"lalala b = "example" c1 = 7 (this is correct) c2 = 0 (this is wrong)
... View more