Hacker News new | past | comments | ask | show | jobs | submit login

I often use `\K` instead, which also helps if it is variable length lookbehind

    $ echo 'foo=5, Bar=3; x1=83, y=120' | grep -oP '\b[a-z]+=\K\d+'
    5
    120
further reading: https://stackoverflow.com/questions/11640447/variable-length...



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: