I have strL a variable (pgttype) that contains several results such as:
"Aneuploidy CRMI 13, 15, 16, 17, 18, 21, 22, X, Y"
"Translocation 46,XX,t(12;21)(q24.33;q22.13)"
"Aneuploidy CRMI 13, 15, 16, 17, 18, 21, 22, X, Y, Add Chromosome 14, Translocation 45,XY,der(13;14)(q10;q10), Gender Selection Pt Choice F"
I am trying to find a way to search within these long string variables to create a new variable (pgttype1) that discretely categorizes such as:
1) contains "aneuploidy" but does not contain "translocation"
or
2) contains "translocation" but does not contain "gender selection"
Can't seem to get it to work with regexm or strpos...
Any ideas?
Thanks in dance
0 Response to Searching within strings
Post a Comment