How to extract LUA error lines using regular syntax?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
Stargazer
Posts: 1
Joined: Sat Dec 06, 2003 9:45 am

How to extract LUA error lines using regular syntax?

Post 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.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post 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 \([^(]+\).
Hope this was helpful.............good luck,
Bob
Post Reply