(New message)
Subject review (reverse sequence)
Posted by
Larkin
(278 posts) bio
Date
Fri 22 Aug 2008 03:19 PM (UTC) [ quote
]
Message
Ah. Okay. Didn't realize it was only for colors. :(
I do have the brackets escaped in my pattern. The forum stripped out the backslashes because of forum codes. Good eye, though!
Thanks for the help. top
Posted by
Worstje
Netherlands (867 posts) bio
Date
Fri 22 Aug 2008 02:39 PM (UTC) [ quote
] Amended on Fri 22 Aug 2008 02:45 PM (UTC) by Worstje
Message
That is because "Repeat on same line" isn't meant for that. "Repeat on same line" only affects the colouring options of the trigger, not the scripting part.
Likewise: your trigger is botched. You should atleast try to escape the [] ones, since now it is treating them as a character class and not as literal characters.
Edit: if you want I can get you the triggers I use for Aetolia later. I think I used three seperate triggers, but I made them years ago when I just started scripting. top
Posted by
Larkin
(278 posts) bio
Date
Fri 22 Aug 2008 02:26 PM (UTC) [ quote
]
Message
I wanted to simplify my code for capturing the contents of my rift (Lusternia) from a regex with three groups, two of them optional, to just one group that repeats. The repeat on same line option had no effect at all, however. Can anyone tell me if I'm doing something wrong?
Rift output shows:
Glancing into the Rift, you see:
[ 23] yarrow [ 588] colewort [ 144] wormwood
[ 192] kombu [ 158] reishi [ 103] arnica
[1305] coltsfoot [ 201] yellowtint [ 251] pearl
[ 304] moonstone [1077] platinum [1200] gold
[ 425] greentint [ 297] marble [1497] wood
[ 502] rope [ 90] redtint [ 279] amethyst
[ 188] jade [ 359] bloodstone [ 298] bluetint
[ 240] ruby [ 105] turquoise [ 351] beryl
[ 260] emerald [ 405] onyx [ 300] gems
[ 281] opal [ 244] purpletint [ 399] cloth
[ 225] coral [ 880] steel [ 288] garnet
[ 303] sapphire [ 21] goldtint [ 100] coal
[ 678] salt [ 600] sulfur [ 169] pennyroyal
[ 682] sparkleberry [ 152] earwort [1056] marjoram
[ 107] rosehips [ 11] sage [ 180] silver
[ 129] myrtle [ 170] horehound [ 39] galingale
[ 909] calamus [ 174] kafe [ 29] merbloom
[ 385] iron [ 26] juniper [ 416] mistletoe
[ 219] spices [ 436] diamond [ 328] leather
[ 165] chervil [ 200] sargassum
Trigger I tried that doesn't work:
<triggers>
<trigger
enabled="y"
match="\s+[\s*(\d+)] (\w+)"
regexp="y"
repeat="y"
send_to="12"
sequence="10000"
>
<send>gear:rift("%2", %1)</send>
</trigger>
</triggers>
(Also tried it with keep_evaluating="y" and that had no effect.)
Trigger I'm using that does work:
<triggers>
<trigger
enabled="y"
match="^ [\s*(\d+)] (\w+)(?:\s+[\s*(\d+)] (\w+))?(?:\s+[\s*(\d+)] (\w+))?$"
regexp="y"
send_to="12"
sequence="10000"
>
<send>gear:rift("%2", %1)
if #"%4" > 0 then
gear:rift("%4", %3)
if #"%6" > 0 then
gear:rift("%6", %5)
end
end</send>
</trigger>
</triggers> top
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
1,739 views.
Reply to this subject
Start a new subject
  Refresh page
Go to topic:
(Choose topic)
Area Editor: Bug reports
Area Editor: General
Area Editor: News and updates
Area Editor: Suggestions
Area Editor: Tips and tricks
Dawn of Time: Administration
Dawn of Time: Configuration
Dawn of Time: Installing/compiling the server
Dawn of Time: New Dawn Muds Announcements
Dawn of Time: Playing
Dawn of Time: What is Dawn of Time (Dawn)?
Electronics: Microprocessors
Electronics: Operational Amplifiers
Forum: About
Forum: Announcements
Forum: Mailing other users
Forum: Problems
Forum: Registering
Forum: Searching
Forum: Subscribing
Forum: Suggestions
Forum: Test
Forum: Time zones / time display
Forum software: Administration
Forum software: Installation
MUDs: Announcements
MUDs: General
MUDs: MUD Design Concepts
MUSHclient: Announcements
MUSHclient: Beta testing
MUSHclient: Bug reports
MUSHclient: Development
MUSHclient: General
MUSHclient: Getting Started
MUSHclient: International
MUSHclient: Jscript
MUSHclient: Lua
MUSHclient: Miniwindows
MUSHclient: MXP and Pueblo
MUSHclient: Perlscript
MUSHclient: Plugins
MUSHclient: Python
MUSHclient: Suggestions
MUSHclient: Tips and tricks
MUSHclient: VBscript
MUSHclient: Wine
PennMUSH: Compiling the server
PennMUSH: Running the server
Programming: General
Programming: STL
Quilting: General
ROM: Compiling the server
ROM: Running the server
SMAUG: Commands
SMAUG: Compiling the server
SMAUG: Lua
SMAUG: Running the server
SMAUG: SMAUG coding
Search the forum
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )