Re: Regular expression

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks everyone.

The reason I wanted to use Regular expressions was merely to learn more
about it i.e. I agree that the String class can be used but I wondered how
Regex could be used.

Thanks again

Geoff

"Dragon" <no@xxxxxxxxxxx> wrote in message
news:%23fa$w8NnFHA.3900@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Jeoff,
>
> If you really want to use regex for this job it will be:
>
> ~
> Dim str As String = "This is a test & I hope it works"
> Dim result() As String = Regex.Split(str, "&")
> ~
>
> However, if I were you I would use:
>
> ~
> Dim str As String = "This is a test & I hope it works"
> Dim result() As String = str.Split("&"c)
> ~
>
> Hope it helps
>
> Roman
>
>


.



Relevant Pages

  • Re: Simple Regex for Alpha-Numerics?
    ... $bReturn = is_alphanum. ... Can somebody help me do this with regular expressions? ... Any particular reason you really need a regex? ...
    (comp.lang.php)
  • Re: Simple Regex for Alpha-Numerics?
    ... $bReturn = is_alphanum. ... Can somebody help me do this with regular expressions? ... Any particular reason you really need a regex? ...
    (comp.lang.php)
  • Re: Search for multiple things in a string
    ... >> I also feel that Regular Expressions, being an object in asp.net (not ... So using Regex is not really like using another language (as C# is different ... I agree with you that readability is important. ... And I was not saying experiment with it. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: for a laught (???)
    ... Regex doesn't work too well with a null byte delimiter :-) ... the API for a particular form of regular expressions ... Regex doesn't work with null terminated strings. ... qualifier or the qualifier "commonly" might have suggested. ...
    (comp.lang.cobol)
  • Re: Search for multiple things in a string
    ... >>> As far as readability, it has nothing to do with Regular Expressions ... > and Regex. ... >> characters in the string, perhaps even writing your own state machine ...
    (microsoft.public.dotnet.languages.csharp)