Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2008 SIntax in regex

$
0
0
Hi to all:

I have this few lines of code that work very well in my code:

Code:

For Each m As Match In New Regex("0(19E|19F|70A|190|22C|22D|70C|)\w+").Matches(msg)
            Select Case Microsoft.VisualBasic.Left(m.Value, 4)
                Case "019E"
                    Trama_1 = m.Value
                Case "019F"
                    Trama_2 = m.Value
                Case "070A"
                    Trama_3 = m.Value
                Case "0190"
                    Trama_4 = m.Value
                Case "022C"
                    Trama_5 = m.Value
                Case "022D"
                    Trama_6 = m.Value
                Case "070C"
                    Trama_7 = m.Value
            End Select
        Next

that i would like if i can in this line:

Code:

For Each m As Match In New Regex("0(19E|19F|70A|190|22C|22D|70C|)\w+").Matches(msg)
on "0" put more one caracther like "f", i mean the line could consider "019E, 019F, ...." or "f19E, f19F, ..."

THis is possible?

THanks

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>