- Joined
- Dec 30, 2015
- Messages
- 78
- Reaction score
- 47
- First Language
- English
- Primarily Uses
- RMMV
Hey guys,
In all my years of programming, regular expressions have just been the bane of my existence, but sadly my knowledge of how they function just isn't enough to solve my current problem. Basically I'm looking to set up some escape-string functionality, like that found in the message window. For example, I have:
\IDENTIFIER[KEY: VALUE]
Where IDENTIFIER is a string with more than one character, I had it working using:
/\\IDENTIFIER\[(\w+):[ ](\w+)\]/Though my test case only had my code in the message window. Once I added some other text, it just broke. It also broke when I made VALUE be more than one word, which is expected I guess because of the second capture group (\w+). I tried using (.+) to cater for that but that just matches the entire message block.
Any of you wizards have any idea how to get this to work? I know the Yanfly plugins use similar regex statements but seemingly nothing I can one-to-one against to see where I'm going wrong.
In all my years of programming, regular expressions have just been the bane of my existence, but sadly my knowledge of how they function just isn't enough to solve my current problem. Basically I'm looking to set up some escape-string functionality, like that found in the message window. For example, I have:
\IDENTIFIER[KEY: VALUE]
Where IDENTIFIER is a string with more than one character, I had it working using:
/\\IDENTIFIER\[(\w+):[ ](\w+)\]/Though my test case only had my code in the message window. Once I added some other text, it just broke. It also broke when I made VALUE be more than one word, which is expected I guess because of the second capture group (\w+). I tried using (.+) to cater for that but that just matches the entire message block.
Any of you wizards have any idea how to get this to work? I know the Yanfly plugins use similar regex statements but seemingly nothing I can one-to-one against to see where I'm going wrong.
Last edited by a moderator:


