Suppose my long sequence looks like, 5’-AGGGTTTCCCTGACCTTCACTGCAGGTCATGCA-3 The two italics subsequences (here within the two stars) in this long sequence are combinedly called as inverted repeat pattern. The length and the combination of the four letters such as A,T,G,C in those two subsequences will be varying. But there is a relation between these two subsequence. Notice that, when you consider the first subsequence then its complementary subsequence is ACTGGA (according to A combines with T and G combine with C) and when you invert this complementary subsequence (i,e last letter comes first) then it matches with the second subsequence. There are large no of such patterns are present in a FASTA sequence (contains 10 million ATGC letters ) and I want to find such pattern and their start and end position. Could anyone help me in this regard.