Click here to Skip to main content
15,904,935 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: extra menu Pin
Jim Matthews9-Dec-04 6:52
Jim Matthews9-Dec-04 6:52 
GeneralRe: extra menu Pin
GaryKoh10-Dec-04 4:23
GaryKoh10-Dec-04 4:23 
Generalconverting from numbers to words "Crystal reports" Pin
anom2m9-Dec-04 1:31
anom2m9-Dec-04 1:31 
GeneralRe: converting from numbers to words "Crystal reports" Pin
Dave Kreskowiak9-Dec-04 3:10
mveDave Kreskowiak9-Dec-04 3:10 
GeneralRe: converting from numbers to words "Crystal reports" Pin
A.Kishior12-Dec-04 9:15
A.Kishior12-Dec-04 9:15 
GeneralRe: converting from numbers to words "Crystal reports" Pin
anom2m12-Dec-04 21:35
anom2m12-Dec-04 21:35 
QuestionRe: converting from numbers to words "Crystal reports" Pin
The ANZAC11-Feb-09 5:09
The ANZAC11-Feb-09 5:09 
GeneralSending mails in VB without Warning(pls help) Pin
Boominathan9-Dec-04 0:00
Boominathan9-Dec-04 0:00 
GeneralRe: Sending mails in VB without Warning(pls help) Pin
Dave Kreskowiak9-Dec-04 1:11
mveDave Kreskowiak9-Dec-04 1:11 
GeneralRe: Sending mails in VB without Warning(pls help) Pin
Boominathan9-Dec-04 18:04
Boominathan9-Dec-04 18:04 
GeneralRe: Sending mails in VB without Warning(pls help) Pin
Dave Kreskowiak10-Dec-04 3:10
mveDave Kreskowiak10-Dec-04 3:10 
GeneralSuspend flexgrid layout while populating data. Pin
mystiqu8-Dec-04 22:54
mystiqu8-Dec-04 22:54 
GeneralRe: Suspend flexgrid layout while populating data. Pin
Jim Matthews9-Dec-04 3:26
Jim Matthews9-Dec-04 3:26 
GeneralSearching text using .net Regular Expression Pin
bahruddina8-Dec-04 22:48
bahruddina8-Dec-04 22:48 
GeneralRe: Searching text using .net Regular Expression Pin
Mekong River8-Dec-04 23:04
Mekong River8-Dec-04 23:04 
GeneralRe: Searching text using .net Regular Expression Pin
Florent Geffroy8-Dec-04 23:29
Florent Geffroy8-Dec-04 23:29 
Hi !

You must use the System.Text.RegularExpressions.Regex class for this.

For string starting with NA, the pattern will be "^NA", ending with NA is "NA$", and containing NA is just "NA". Here's a small sample console application I've made :

Imports System.text.RegularExpressions

Module RegExpTest

    Sub Main()

        Dim Start As String = "NAZERTYUIOP"
        Dim [End] As String = "AZERTYUIOPNA"
        Dim Inside As String = "AZERTNAUIOP"

        Dim rStart As New Regex("^NA")
        Dim rEnd As New Regex("NA$")
        Dim rInside As New Regex("NA")

        Console.WriteLine(rStart.Match(Start).Success)
        Console.WriteLine(rEnd.Match([End]).Success)
        Console.WriteLine(rInside.Match(Inside).Success)

        Console.WriteLine(rEnd.Match(Start).Success)
        Console.WriteLine(rStart.Match([End]).Success)

        Console.ReadLine()

    End Sub

End Module

GeneralRe: Searching text using .net Regular Expression Pin
bahruddina9-Dec-04 0:28
bahruddina9-Dec-04 0:28 
GeneralRe: Searching text using .net Regular Expression Pin
Florent Geffroy9-Dec-04 0:42
Florent Geffroy9-Dec-04 0:42 
GeneralRe: Searching text using .net Regular Expression Pin
bahruddina10-Dec-04 1:09
bahruddina10-Dec-04 1:09 
GeneralWith ... End With block & performance Pin
Florent Geffroy8-Dec-04 22:19
Florent Geffroy8-Dec-04 22:19 
GeneralRe: With ... End With block & performance Pin
Dave Kreskowiak9-Dec-04 1:07
mveDave Kreskowiak9-Dec-04 1:07 
GeneralRe: With ... End With block & performance Pin
Florent Geffroy9-Dec-04 1:19
Florent Geffroy9-Dec-04 1:19 
Generalmultiforms and objects Pin
Nadroj8-Dec-04 20:35
Nadroj8-Dec-04 20:35 
GeneralRe: multiforms and objects Pin
Nadroj8-Dec-04 20:46
Nadroj8-Dec-04 20:46 
Generalhelp please Pin
Member 15740198-Dec-04 19:57
Member 15740198-Dec-04 19:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.