- Joined
- Nov 13, 2020
- Messages
- 3
- Reaction score
- 2
- First Language
- English
- Primarily Uses
- RMMV
Hello,
I have been trying to get this JS script just right, but my research and extremely limited regex experience is not helping.
It is very easy to use RPG's meta field, unfortunately my tags do not allow me to utilize the "meta" property since they use the same key name.
These are the tags I want to use:
This is the code I am using to attempt parsing:
I have tried using "/<sal_step: (.*)>/i" as my regex pattern but this grabs both tags in one string. I don't know what I am doing wrong, but until I can break the tags into an array of strings I won't be able to start parsing for data.
Please help! (Using RPG MV Maker 1.6.1, on Debian 9 Linux)
I have been trying to get this JS script just right, but my research and extremely limited regex experience is not helping.
It is very easy to use RPG's meta field, unfortunately my tags do not allow me to utilize the "meta" property since they use the same key name.
These are the tags I want to use:
Code:
<sal_step: 1, sal_pavedFootsteps, 100>
<sal_step: 2, sal_pavedFootsteps, 150>
This is the code I am using to attempt parsing:
JavaScript:
var regexPattern = "/<sal_step: (.*)>/i";
var notesAsString = $gameMap.tileset().note; //gets note data
var arrayOfNotes = notesAsString.split(regexPattern); //should split into an array
var result = arrayOfNotes[0];
console.log(result); //this sadly outputs all note data as a single string, instead of a string array value
I have tried using "/<sal_step: (.*)>/i" as my regex pattern but this grabs both tags in one string. I don't know what I am doing wrong, but until I can break the tags into an array of strings I won't be able to start parsing for data.
Please help! (Using RPG MV Maker 1.6.1, on Debian 9 Linux)