I have PHP scripts that have a function, in the following format i8n('Content')
, but I need to find all the strings that are inside i8n.
Using some regular expressions I managed to get results close to what I want.
RegEx: i8n\('(.*)'\)
Content: i8n('First Message.');
Result: First Message.
For this case, RegEx was perfect. The problem occurs when there is other content on the same line and ends up merging the results.
RegEx: i8n\('(.*)'\)
Content: logErrorUser(i8n('First Message.'), 500, date(), i8n('Second Message, same line.'));
Result: First Message.'), 500, date(), i8n('Second Message, same line.
How do I get each one individually?