Pattern analysis of RNA secondary structure