My problem is this: I want to get different objects from a string , dividing them by the character ;
, except those in parentheses.
Example:
Linha1;
Linha2;
L i n h a 3;
(linha que não quero que apareça; outra; mais uma;)
Linha 4;
And so it's coming out in array :
Lista1, Linha2, L i n h a 3, linha que não quero que apareça, outra, mais uma, linha 4
But I do not want the line that I do not want to appear, either the "other" or the "plus one" is included in this array , or summarizing: I do not want anything in parentheses to be included in the list.
Update
No one can understand what I want, here's an example of my code in my language:
{
echo "Olá, mundo!";
echo "Aqui é outro bloco!";
def MeuTeste = "24055";
if 123 = 123 (echo "Executa isso!"; echo "isso também!";);
if 123 = 545 (echo "Não execute isso!"; echo "ignore isso!";);
pause;
}
Here is the structure that separates each statement
with the character ;
:
For currentStatement As Integer = 0 To Statements.Split(Separator).Length - 1
Dim currentIndex As String() = Statements.Split(";"c)
Dim currentText As String = currentIndex(currentStatement)
.... comandos que executam o currentText
Correct was to return the values of this variable currentIndex
:
echo "Olá, mundo!"
echo "Aqui é outro bloco!"
def MeuTeste = "24055"
if 123 = 123 (echo "Executa isso!"; echo "isso também!";)
if 123 = 545 (echo "Não execute isso!"; echo "ignore isso!";)
pause
But here's the problem, and it returns like this:
echo "Olá, mundo!"
echo "Aqui é outro bloco!"
def MeuTeste = "24055"
if 123 = 123 (echo "Executa isso!"
echo "isso também!"
)
if 123 = 545 (echo "Não execute isso!"
echo "ignore isso!"
)
pause
Moral of the story, it separates everything that is between parentheses and my question is this: How do I not separate what's inside the parentheses?, anyway, I do not want which excludes what is in the parentheses, but just do not separate each thing by the character ;
.