Let's say that I have a given string in javascript - for example, var s = "{{1}}SomeText{{2}}SomeText";It can be very long (for example, 25,000+ characters).
NOTE . I use "SomeText" here as a placeholder to refer to any number of characters in plain text. In other words, “SomeText” can be any text string that does not include {{1}} or {{2}}. So the above example may be var s = "{{1}}Hi there. This is a string with one { curly bracket{{2}}Oh, very nice to meet you. I also have one } curly bracket!";. And that would be perfectly correct.
The rules for him are simple:
No need to have instances {{2}}. However, if this happens, then after this instance we will not be able to meet another {{2}}, unless we find it {{1}}.
Valid examples:
"{{2}} SOMETEXT"
"{{1}} {{SOMETEXT 2}} SOMETEXT"
"{{1}} {SOMETEXT {1}} {{SOMETEXT 2}} SOMETEXT"
"{{1}} {SOMETEXT {1}} {{SOMETEXT 2}} {SOMETEXT {1}} SOMETEXT"
"{{1}} {SOMETEXT {1}} {{SOMETEXT 2}} {SOMETEXT {1}} {SOMETEXT {1}} SOMETEXT"
"{{1}} {SOMETEXT {1}} {{SOMETEXT 2}} {SOMETEXT {1}} {SOMETEXT {1}} {{SOMETEXT 2}} SOMETEXT"
etc...
Invalid examples:
"{{2}} {{SOMETEXT 2}} SOMETEXT"
"{{1}} {{SOMETEXT 2}} {{SOMETEXT 2}} SOMETEXT"
"{{1}} {{SOMETEXT 2}} {{SOMETEXT 2}} {SOMETEXT {1}} SOMETEXT"
etc...
- , - . , , " " - .
. , " ", .