Tier 2 · Archmageextract
Sterling Only
Extract the amounts that are prefixed with £ — and not the £ itself.
A lookbehind checks what came before the current position without including it in the match. It is how you match "the bit after the marker" while leaving the marker out.
Your pattern1 chars · par 22
//g
Flags
Start typing — tests run as you go.0 of 3 visible tests passing
Test cases
£10 and $20→ ["10"]£3.50 plus £12→ ["3.50", "12"]$99 only→ []
+ 3 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.