I am trying to make a trigger to grab data from a status report in TrekMUSH; There are a few commands that have very similar output so I need to do a multiline to verify this is the one I want.
Here is part of the output. (There are more lines, but this chunk is really what I need.)
I need to be able to grab the coordinates that follow "Galactic XYZ:", but the number of spaces varies depending on the numbers, and the trigger doesn't seem to catch it.
I -thought- just use a * to grab it all, and then use a script to trim what I need, but the wildcard matching doesn't ignore whitepsace.
A secondary question, but highly related to this, is if there is a way to ignore arbitrary whitespace in a trigger or alias and only return non whitespace?
E.g.
Would match the same trigger/alias and just ignore the extra whitespace.
I'd really appreciate some assistance with this.
Currently what I do is, pass the whole match string to a lua function that strips whitespace and converts the string into a table that I can parse, but that feels very hackish to me.
Here is part of the output. (There are more lines, but this chunk is really what I need.)
--[Helm Status Report]---------------------------------------------------------
Galactic X Y Z: -9457.649 56.074 -79.870
Relative X Y Z: 120.295 -63.926 10.130
Destinat X Y Z: -106.900 -1.900 -50.100
-------------------------------------------------------------------------------
I need to be able to grab the coordinates that follow "Galactic XYZ:", but the number of spaces varies depending on the numbers, and the trigger doesn't seem to catch it.
I -thought- just use a * to grab it all, and then use a script to trim what I need, but the wildcard matching doesn't ignore whitepsace.
A secondary question, but highly related to this, is if there is a way to ignore arbitrary whitespace in a trigger or alias and only return non whitespace?
E.g.
cf 1 5 6
and
cf 1 5 6
Would match the same trigger/alias and just ignore the extra whitespace.
I'd really appreciate some assistance with this.
Currently what I do is, pass the whole match string to a lua function that strips whitespace and converts the string into a table that I can parse, but that feels very hackish to me.