lua-users home
lua-l archive

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


On Sat, Jul 18, 2015 at 3:26 PM, Tom N Harris <whoopdedo@whoopdedo.org> wrote:
> On Saturday, July 18, 2015 02:45:18 PM Rena wrote:
>> Well, regardless of whether it's classified as a character class or a set
>> or a special case or a fruit or a vegetable, I've many times wished I could
>> write a pattern such as "[ ^]%w+[ $]" (match one or more word characters
>> bounded by either a space or the start/end of a string). Though ^ already
>> has a meaning there...
>
> No regex-like implementation I know of works like that, though. I'd write "(^|
> )%w+($| )". Lua doesn't have the alternation operator however. Is that what's
> really being asked for? But disguised as a discussion about character classes.
>
> --
> tom <telliamed@whoopdedo.org>
>

Alternation would be great, but I think it's been discussed before and
it would add too much complexity to the implementation.

-- 
Sent from my Game Boy.