Any Character: . matches any character except \n : Match « Regular Expressions « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » Regular Expressions » Match 
20.6.4.Any Character: . matches any character except \n
Imports System.Text.RegularExpressions

Module Example
   Public Sub Main()
      Dim pattern As String = "^.+"
      Dim input As String = "This is one line and" + vbCrLf + "this is the second."
      For Each match As Match In Regex.Matches(input, pattern)
         Console.WriteLine(Regex.Escape(match.Value))
      Next
      Console.WriteLine()
      For Each match As Match In Regex.Matches(input, pattern, RegexOptions.SingleLine)
         Console.WriteLine(Regex.Escape(match.Value))
      Next
   End Sub
End Module
20.6.Match
20.6.1.[\p{P}\d] matches all punctuation and decimal digit characters.
20.6.2.[\s\p{P}] matches all white-space and punctuation.
20.6.3.Negative Character Group: [^]
20.6.4.Any Character: . matches any character except \n
20.6.5.Unicode Category or Unicode Block: \p{}
20.6.6.\W matches any non-word character.
20.6.7.(\w+) matches one or more word characters.
20.6.8.(\w){1,2} matches a non-word character either one or two times.
20.6.9.[aeiou] matches all vowels.
20.6.10.Either/Or Pattern Matching with | section
20.6.11.Regular expression using either/or
20.6.12.Regular expression using character class.
20.6.13.Negative Unicode Category or Unicode Block: \P{}
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.