Protein sequences are typical complex systems and the knowledge of their local features is very important to predict their secondary structures and biological function. In the present paper a compositional complexity is used to measure the local features of the protein sequences. We found that the transition segments between the regular secondary structures (α-helices and β-strands) and irregular secondary structures (loops and turns) usually have higher complexity than the neighboring segments. This result may be useful to identify the locations of irregular secondary structures which usually are active sites.