Signal9Signal9 — home
online
back to labs

Regex: Quantifier ? (Optional)

MediumRegular Expressions5-10 min
The brief

Extract every 'http' or 'https' token from /root/work/urls.txt into /root/work/out.txt, one per line.

Output just the token that matched, not the whole line it came from.

What you'll do
  • out.txt holds each http/https token, one per line

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.