Re: [Tutor] Printing regular expression match

2005-12-03 Thread Srinivas Iyyer
Hi Danny, thanks for your email. In the example I've shown, there are no odd elements except for character case. In the real case I have a list of 100 gene names for Humans. The human gene names are conventioanlly represented in higher cases (eg.DDX3X). However, NCBI's gene_info dataset the

Re: [Tutor] Printing regular expression match

2005-12-03 Thread Danny Yoo
On Sat, 3 Dec 2005, Srinivas Iyyer wrote: > >>> a > ['apple', 'boy', 'boy', 'apple'] > > >>> b > ['Apple', 'BOY', 'APPLE-231'] > > >>> for i in a: > pat = re.compile(i,re.IGNORECASE) > for m in b: > if pat.match(m): > print m Hi Srinivas, We may

[Tutor] Printing regular expression match

2005-12-03 Thread Srinivas Iyyer
Dear group, I have two lists: >>> a ['apple', 'boy', 'boy', 'apple'] >>> b ['Apple', 'BOY', 'APPLE-231'] >>> for i in a: pat = re.compile(i,re.IGNORECASE) for m in b: if pat.match(m): print m Apple APPLE-231 BOY