BIG EDIT: This is no longer a question, but an answer.
SECOND BIG EDIT: This is no longer a question, but an archived post. This thread has a more updated solution: RegEx compilation thread
The question:
So something has been bugging me for quite a while now, something that would totally revolutionize the starmade world. I've actually discussed this with a couple other users for a while now, and we can't find a solution so I'm forced to ask here.
Is there any way to have a display read one word at a time, with multiple words on a single line? Something like this:
[display 1] "the quick red fox jumps over the lazy brown dog"
[display 2]REPLACEALL words 2 through 99 with " "
and feed that statement through the first display block to be left with the word: "the "
This is what I have so far, but it doesnt work. Might illustrate better what I wanted though:
Regex101 - online regex editor and debugger
The answer: Pt.1
[replaceall]^(?:[^:]*\:BACK PARENTHESES{1}([^:]*:BACK PARENTHESES [with]:
The answer: Pt.2
[replaceall]([^:]*:BACK PARENTHESES{1}$[with]:
So My new question is this: How do you guys think this can be used? Here's a hasty and vague gif of how I intend to use it:
SECOND BIG EDIT: This is no longer a question, but an archived post. This thread has a more updated solution: RegEx compilation thread
The question:
So something has been bugging me for quite a while now, something that would totally revolutionize the starmade world. I've actually discussed this with a couple other users for a while now, and we can't find a solution so I'm forced to ask here.
Is there any way to have a display read one word at a time, with multiple words on a single line? Something like this:
[display 1] "the quick red fox jumps over the lazy brown dog"
[display 2]REPLACEALL words 2 through 99 with " "
and feed that statement through the first display block to be left with the word: "the "
This is what I have so far, but it doesnt work. Might illustrate better what I wanted though:
Regex101 - online regex editor and debugger
The answer: Pt.1
so this removes the first occurence (or any number of occurences with the number in { }:so I think I finally managed to get this to do half of what I want now, use this code to remove the first field from the string:
[replaceall]^(?:[^:]*\:BACK PARENTHESES{1}([^:]*:BACK PARENTHESES [with]:
(replace the capital words with one of these ")"
the string has to start with a : Each field has to end with a : for the next field to start.
EX: <:the super: A E S T H E T I C : ship: build:>
then we just need one to remove the last field.
edit: this is only half of what I need it to do, not all.
[replaceall]^(?:[^:]*\:BACK PARENTHESES{1}([^:]*:BACK PARENTHESES [with]:
The answer: Pt.2
And this one removes the last occurrence:ok so here's the other part to this, it all had to do with this symbol "$" which forces regex to look at the end of the line, or something :/ anywho, here's the code:
[replaceall]([^:]*:BACK PARENTHESES$[with]x
Now I need a way to duplicate what the other part of the code does, which is replace the last field without having to use another display block with [del]1 so I can get rid of the X.
update 1: use this code to delete any number of fields from the end that you like, just like the one that removes from the front: [replaceall]([^:]*BACK PARENTHESES{1}$[with]:
still have to use [del]1 though afterwards..
[replaceall]([^:]*:BACK PARENTHESES{1}$[with]:
So My new question is this: How do you guys think this can be used? Here's a hasty and vague gif of how I intend to use it:
Last edited: