Click here to Skip to main content
16,006,440 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralLinking DLL's Pin
Simon W Ross9-Dec-04 22:18
Simon W Ross9-Dec-04 22:18 
GeneralRe: Linking DLL's Pin
Dave Kreskowiak10-Dec-04 3:24
mveDave Kreskowiak10-Dec-04 3:24 
Generalprevent form from closing Pin
Nadroj9-Dec-04 10:12
Nadroj9-Dec-04 10:12 
Questionhow to grap current HTML Pin
rwbuentello9-Dec-04 8:16
rwbuentello9-Dec-04 8:16 
Questionhow to connect to database by using webservices?? Pin
arzu9-Dec-04 7:15
arzu9-Dec-04 7:15 
AnswerRe: how to connect to database by using webservices?? Pin
Dave Kreskowiak9-Dec-04 9:10
mveDave Kreskowiak9-Dec-04 9:10 
AnswerRe: how to connect to database by using webservices?? Pin
Mekong River11-Dec-04 4:52
Mekong River11-Dec-04 4:52 
Generalextra menu Pin
GaryKoh9-Dec-04 5:44
GaryKoh9-Dec-04 5:44 
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 

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.