lua-users home
lua-l archive

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


Hi all,
I'm new in LUA; It seems that Lua does not use POSIX regular expressions (regexp) for pattern matching. Now, I've little issue and I don’t know what to do.

Let me explain better or at least I try...
On Linux (with Lua 5.1.4) I use this:

s = os.getenv("HOSTNAME") to catch the FQDN, therefore the result is:
vimhost-axzh9a.ch.bwww.com

but for me is useful only this value -> axzh9a (that obviously changes depending on the Linux server)

Is possible, with LUA, to cut from FQDN:
vimhost-
and
.ch.bwww.com

Thanks to anyone who will help me

Inviato con l'email sicura di Proton Mail.