I have to solve a problem for my wife who is engaged in Research in Breast Cancer.
1. She has frequently to search a list of alphabetic characters for an exact match of a pattern.
This pattern can be pasted into a file.Sometimes the characters are presented to her as a single line but other times as several columns which actually are intended to be a single line.
Also the case can vary.
e.g. mwaaagglwrsraglralfrsrdaalfpgcerglhcsavscknwlkkfasktkkkvwyespslgshstykpskleflmrstskktrkedharlralngllykaltdllctpevsqelydlnvelskvsltpdfsacraywkttlsaeqnahmeavlqrsaahmslisywqsqtldpgmkettlykmisgtlmphnpaapqsrpqapvcvgsimrrstsrlwstkggkikgsgawcgrgrwls
OR
mwaaagglwrsraglralfrsrdaalfpgc
erglhcsavscknwlkkfasktkkkvwyes
pslgshstykpskleflmrstskktrkedh
arlralngllykaltdllctpevsqelydl
nvelskvsltpdfsacraywkttlsaeqna
hmeavlqrsaahmslisywqsqtldpgmke
ttlykmisgtlmphnpaapqsrpqapvcvg
simrrstsrlwstkggkikgsgawcgrgrwls
OR
MWAAAGGLWRSRAGLRALFRSRDAALFPGC
ERGLHCSAVSCKNWLKKFASKTKKKVWYES
PSLGSHSTYPKSKLEFLMRSTSKKTRKEDH
ARLRALNGLLYKALTDLLCTPEVSQELYDL
NVELSKVSLTPDFSACRAYWKTTLSAEQNA
HMEAVLQRSAAHMSLISYWQSQTLDPGMKE
TTLYKMISGTLMPHNPAAPQSRPQAPVCVG
SIMRRSTSRLWSTKGGKIKGSGAWCGRGRWLS
OR
MWAAAGGLWRSRAGLRALFRSRDAALFPGCERGLHCSAVSCKNWLKKFASKTKKKVWYEPSLGSHSTYPKSKLEFLMRSTSKKTRKEDHARLRALNGLLYKALTDLLCTPEVSQELYDLNVELSKVSLTPDFSACRAYWKTTLSAEQNAHMEAVLQRSAAHMSLISYWQSQTLDPGMKETTLYKMISGTLMPHNPAAPQSRPQAPVCVGSIMRRSTSRLWSTKGGKIKGSGAWCGRGRWLS
2. There are ONLY two patterns to be searched for -
r?r??s
r?r??t
The ? can be any of the following characters
acdefghiklmnpqrstvxy
3. Once an exact match/s has been made it is essential to know the number of characters from the start of the line to each match.It is possible that there is more than one match.
Can anyone suggest a program in ANSI C that will compile in the first instance in Solaris (SunOS 5.9).
But is portable (source and then re compile) to HP-UX and AIX and to XP.
It is urgent.
Thanks
1. She has frequently to search a list of alphabetic characters for an exact match of a pattern.
This pattern can be pasted into a file.Sometimes the characters are presented to her as a single line but other times as several columns which actually are intended to be a single line.
Also the case can vary.
e.g. mwaaagglwrsraglralfrsrdaalfpgcerglhcsavscknwlkkfasktkkkvwyespslgshstykpskleflmrstskktrkedharlralngllykaltdllctpevsqelydlnvelskvsltpdfsacraywkttlsaeqnahmeavlqrsaahmslisywqsqtldpgmkettlykmisgtlmphnpaapqsrpqapvcvgsimrrstsrlwstkggkikgsgawcgrgrwls
OR
mwaaagglwrsraglralfrsrdaalfpgc
erglhcsavscknwlkkfasktkkkvwyes
pslgshstykpskleflmrstskktrkedh
arlralngllykaltdllctpevsqelydl
nvelskvsltpdfsacraywkttlsaeqna
hmeavlqrsaahmslisywqsqtldpgmke
ttlykmisgtlmphnpaapqsrpqapvcvg
simrrstsrlwstkggkikgsgawcgrgrwls
OR
MWAAAGGLWRSRAGLRALFRSRDAALFPGC
ERGLHCSAVSCKNWLKKFASKTKKKVWYES
PSLGSHSTYPKSKLEFLMRSTSKKTRKEDH
ARLRALNGLLYKALTDLLCTPEVSQELYDL
NVELSKVSLTPDFSACRAYWKTTLSAEQNA
HMEAVLQRSAAHMSLISYWQSQTLDPGMKE
TTLYKMISGTLMPHNPAAPQSRPQAPVCVG
SIMRRSTSRLWSTKGGKIKGSGAWCGRGRWLS
OR
MWAAAGGLWRSRAGLRALFRSRDAALFPGCERGLHCSAVSCKNWLKKFASKTKKKVWYEPSLGSHSTYPKSKLEFLMRSTSKKTRKEDHARLRALNGLLYKALTDLLCTPEVSQELYDLNVELSKVSLTPDFSACRAYWKTTLSAEQNAHMEAVLQRSAAHMSLISYWQSQTLDPGMKETTLYKMISGTLMPHNPAAPQSRPQAPVCVGSIMRRSTSRLWSTKGGKIKGSGAWCGRGRWLS
2. There are ONLY two patterns to be searched for -
r?r??s
r?r??t
The ? can be any of the following characters
acdefghiklmnpqrstvxy
3. Once an exact match/s has been made it is essential to know the number of characters from the start of the line to each match.It is possible that there is more than one match.
Can anyone suggest a program in ANSI C that will compile in the first instance in Solaris (SunOS 5.9).
But is portable (source and then re compile) to HP-UX and AIX and to XP.
It is urgent.
Thanks