Course of Raku / Regexes and grammars / Regexes / Anchors / Exercises

The whole string

Problem

Write a pattern that succeeds only when the entire string consists of lowercase letters and nothing else. Test it on 'hello' and print a plain True or False.

Example

The program prints:

True

Solution

✅ See the solution

Course navigation

← Solution: Starts with   |   Solution: The whole string →