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

Starts with

Problem

Write a pattern that succeeds only when a string starts with a digit. Test it on '3 apples' and print a plain True or False.

Example

The program prints:

True

Solution

See the solution

Course navigation

Quiz — Anchors   |   Solution: Starts with