TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Stefan Ristic
NA
1
2.1k
Problem with Regular Expressions
Mar 24 2011 5:25 PM
Ok, I have a problem using Regular Expressions in VB.NET 2005:
Imports System
Imports System.Text
Imports System.Text.RegularExpressions
'Define regex
Dim regExp As Regex
'Italic text
regExp = New Regex("<i>$1</i>")
RichTextBox2.Text = regExp.Replace(RichTextBox1.Text, "\[i\](.+?)\[\/i\]")
From my point of view, this code should change <i>blahblah</i> from richtextbox1 into [i]blahblah[/i] in richtextbox2.
But, when I Debug this app, it just copy <i></i>(or anything I type in) into richtextbox2. No change. Someone can see where is my problem ?
Reply
Answers (
4
)
Reading characters from stream of file
Print more pages in vb.net 2005