Page 1 of 1

How to extract LUA error lines using regular syntax?

Posted: Sat Dec 06, 2003 9:57 am
by Stargazer
Hard to understand stuff about regular syntax and traversing messages using it. People, please, help me with this line:

Code: Select all

luac: \\Ilia-comp\_proj\Codes\StargazerCurrent\Scripts\test.lua:16: `=' expected
How it should be look in term of ^\([^(]+\)(\([0-9]+\)) ?

Thanks in advance.

Posted: Sat Dec 06, 2003 5:49 pm
by Bob Hansen
It is not clear to me what you are looking for with your example:
luac: \\Ilia-comp\_proj\Codes\StargazerCurrent\Scripts\test.lua:16: `=' expected
Can you show an example of the results you are looking to find in an example of the source you are looking through?

I don't your RegEx will ever give you a result:
^\([^(]+\)(\([0-9]+\))
Perhaps I am wrong, but this is how I am reading your RegEx, without POSIX format:

Starting from the beginning of the line, excluding one or more "(", select one or more digits within a set of parentheses.

I don't know how this will work because you are excluding all "(", but looking for a string of numbers within parentheses. It seems that this will never find the leading "(" in an expression like (23456) because you have asked to exclude it with \([^(]+\).