At the DNA/RNA level, biological signals are defined by a combination of spatial structures and sequence motifs. Until now, few attempts had been made in writing general purpose search programs that take into account both sequence and structure criteria. Indeed, the most successful structure scanning programs are usually dedicated to particular structures and are written using general purpose programming languages through a complex and time consuming process where the biological problem of defining the structure and the computer engineering problem of looking for it are intimately intertwined. In this paper, we describe a general representation of structures, suitable for database scanning, together with a programming language, Palingol, designed to manipulate it. Palingol has specific data types, corresponding to structural elements—basically helices—that can be arranged in any way to form a complex structure. As a consequence of the declarative approach used in Palingol, the user should only focus on ‘what to search for’ while the language engine takes care of ‘how to look for it’. Therefore, it becomes simpler to write a scanning program and the structural constraints that define the required structure are more clearly identified.