lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


How to match last quoted word in a sentence (or first in quotes from end) and print it without quotes?

Example: I "need" a help with "regular" expressions.

Output: regular

I used this example: sentence = I "need" a help with "regular" expressions. quoted = sentence:match("\"[a-zA-Z0-9 ]+\""), but it matches both quoted words.

Thanks