Hi all,
I am trying to match the map one sees in Achaea when seafaring. A map will generally have 25 columns and 17 rows of tiles, represented with various characters.
In the map I am dealing with, these tiles will only be whitespace, 'm', 'w', '?', '=' and '.'.
My current attempt to match this is the following hideous regular expression:
^[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\Z
I then turn on 'Multi-line; match' and set this to 17. However, this seems to fire 17 times, once for every line of the map. My goal is to ultimately capture the entire map as a single string and pass it to a Lua function.
Any help at all would be greatly appreciated.
I am trying to match the map one sees in Achaea when seafaring. A map will generally have 25 columns and 17 rows of tiles, represented with various characters.
In the map I am dealing with, these tiles will only be whitespace, 'm', 'w', '?', '=' and '.'.
My current attempt to match this is the following hideous regular expression:
^[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\n[w\.m ?=]{25}\Z
I then turn on 'Multi-line; match' and set this to 17. However, this seems to fire 17 times, once for every line of the map. My goal is to ultimately capture the entire map as a single string and pass it to a Lua function.
Any help at all would be greatly appreciated.