[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: FQDN Pattern/regex LUA help
- From: "vale.gua" <vale.gua@...>
- Date: Tue, 27 Dec 2022 10:11:48 +0000
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:
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