Conditional expressions and replacement
Posted: Tue Oct 20, 2015 6:43 pm
I have tab-delimited text. Certain columns have YES or NO values. I am trying to replace the YES or NO values with 1 or 0. There are too many columns to do all the permutations of YES or NO in the find expression. I was looking at using the conditional expressions but I just can't understand the Textpad Help enough to figure our how it works.
Here is an small example of the original data.
0 0 0 1 NO NO YES NO 0 0 0 0 0
I want it to be
0 0 0 1 0 0 1 0 0 0 0 0 0
Can anyone tell me if this is even possible in a single (of very few) replacement operations. If it is can you give me or direct me to a fuller description of the use of conditional expressions in Textpad (preferably with examples).
Here is an small example of the original data.
0 0 0 1 NO NO YES NO 0 0 0 0 0
I want it to be
0 0 0 1 0 0 1 0 0 0 0 0 0
Can anyone tell me if this is even possible in a single (of very few) replacement operations. If it is can you give me or direct me to a fuller description of the use of conditional expressions in Textpad (preferably with examples).