I'm trying to use Locating & echoing functions from the Mudlet mapper, but I'm having issues guessing the right perl regex to capture the rooms.
The thing logs like this:
Name - Room name [in/or empty]Area name [number]
Which would, lets say, look like this:
Bob - Bob's kitchen [in]Bob's house 
Bobo - Bob's living room [in]Bob's house 
Rob - Bob's garden [ ]Bob's house 
Tom - Bob's garden [ ]Bob's house 
I came up with this:
Now, that seems to be capturing *some*, sometimes, and the mapper's script manages to echo the room numbers off of it.
(Not sure it matters, but the amount of whitespace characters between the room name and [in/empty] ranges from a lot to one - depending on the length of the room name.)
Any help would be appreciated, thanks!
2 posts • Page 1 of 1
- Posts: 964
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
You will need to escape all four of the '[' and ']' - not just the '['s with a '\' - as they are both special characters to the regex engine unless told that they are not...