Learning a Subclass of Regular Expressions by Recognizing Periodic Repetitions