in reply to Re^2: search one instance
in thread search one instance

Sorry, i missed out a question mark "?" in m/^.*?(?=data)/

Thanks for noticing that :)
Updated the code above...