Hi there is a way to extract text from line to a var?
example:
[color= red]big ogre [/color] smashes [color= blue]tiny elf [/color] , with wooden club hinting his head.
pattern: (^(.*) (smashes|wounding) (.*)\.$)
Magic Code
My code: echo(matches[3] .. " ".. matches[4] .." ".. (matches[5]))
output:
[color= red]big ogre [/color] smashes [color= blue]tiny elf [/color]
Extract colored text from pattern
-
- Posts: 97
- Joined: Wed Jul 25, 2012 12:35 pm
Extract colored text from pattern
English is not my native language. If you don't understand what im writing ask.
Ubuntu 17.04, Mudlet 3.1
Ubuntu 17.04, Mudlet 3.1