Note that there are some explanatory texts on larger screens.

plurals
  1. POC# Regex.Split
    text
    copied!<p>I have a particular problem in complex string:</p> <p>string mode:</p> <pre><code> Description,Title,ContentFooterLeft[JE_Boxes: Identifier,Box,Namespace,Title,Channels,PriorityChannels,ForceChannel,SingleQuery,Template,Elements[JE_Example: Lead],LastNews[JE_Article: Lead, Galeria [JE_Gallery: Title,Banner [JE_Banner: Title],],],],Keywords </code></pre> <p>Tree mode:</p> <pre><code>Description, Title, ContentFooterLeft [ JE_Boxes: Identifier, Box, Namespace, Title, Channels, PriorityChannels, ForceChannel, SingleQuery, Template, Elements [ JE_Example: Lead ], LastNews [ JE_Article: Lead, Galeria [ JE_Gallery: Title, Banner [ JE_Banner: Title ], ], ], ], Keywords </code></pre> <p>And my objective with Regex.Split its something like this:</p> <p>1º [Step] Call function:</p> <pre><code>Regex.Split("Description,Title,ContentFooterLeft[JE_Boxes: Identifier,Box,Namespace,Title,Channels,PriorityChannels,ForceChannel,SingleQuery,Template,Elements[JE_Example: Lead],LastNews[JE_Article: Lead, Galeria [JE_Gallery: Title,Banner [JE_Banner: Title],],],],Keywords", "Regex expression") </code></pre> <p>1º Result:</p> <pre><code>Description Title ContentFooterLeft[JE_Boxes:Identifier,Box,Namespace,Title,Channels,PriorityChannels,ForceChannel,SingleQuery,Template,Elements[JE_Example: Lead],LastNews[JE_Article: Lead, Galeria [JE_Gallery: Title,Banner [JE_Banner: Title],],],] Keywords </code></pre> <p>2º [Step] Call function:</p> <pre><code>Regex.Split("ContentFooterLeft[JE_Boxes:Identifier,Box,Namespace,Title,Channels,PriorityChannels,ForceChannel,SingleQuery,Template,Elements[JE_Example: Lead],LastNews[JE_Article: Lead, Galeria [JE_Gallery: Title,Banner [JE_Banner: Title],],],]", "Regex expression") </code></pre> <p>2º Result:</p> <pre><code>JE_Boxes Identifier Box Namespace Title Channels PriorityChannels ForceChannel SingleQuery Template Elements[JE_Example: Lead] LastNews[JE_Article: Lead, Galeria [JE_Gallery: Title,Banner [JE_Banner: Title],],] </code></pre> <p>3º [Step] Call function:</p> <pre><code>Regex.Split("Elements[JE_Example: Lead]", "Regex expression") Regex.Split("LastNews[JE_Article: Lead, Galeria [JE_Gallery: Title,Banner [JE_Banner: Title],],]", "Regex expression") </code></pre> <p>3º Result:</p> <pre><code>JE_Example Lead </code></pre> <p>AND</p> <pre><code>JE_Article Lead Galeria [JE_Gallery: Title,Banner [JE_Banner: Title],] </code></pre> <p>4º [Step] Call function:</p> <pre><code>Regex.Split("Galeria [JE_Gallery: Title,Banner [JE_Banner: Title],]", "Regex expression") </code></pre> <p>4º Result:</p> <pre><code>JE_Gallery Title Banner [JE_Banner: Title] </code></pre> <p>5º [Step] Call function:</p> <pre><code>Regex.Split("Banner [JE_Banner: Title]", "Regex expression") </code></pre> <p>5º Result:</p> <pre><code>JE_Banner Title </code></pre> <p>Obvious when i know the regular(s) expression(s) i will make this in a recursive method... Sorry for my long text, but this is the best way to present my problem...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload