How to capture characters after last pattern occurrence with regex?

Viewed 306

I am currently matching the last occurance of pattern using this:

__(?:.(?!__+))+$

where the pattern is "__"

However, I need to match the characters after the pattern and not the pattern itself.

for instance, given the string my__field__name__options

I need to capture "options" but the regex above captures "__options".

2 Answers
Related