This works in this case because the next '=' after the required variable also happens to be the last. .*? instead of .* will make sure perl finds the first '=' after the match on "my_variable". It's simpler than my solution with look ahead assertion though, guess I overdid it :)
In reply to Re^2: Multiline regex
by Eily
in thread Multiline regex
by adrya407
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |