Results 1 to 8 of 8
-
24th Mar 2011, 05:24 PM #1OPMember
Regular Expressions in VB.NET 2005 ?
'Define regex
Dim regExp As RegularExpressions.Regex
'Italic text
regExp = New RegularExpressions.Regex("<i>$1</i>")
RichTextBox2.Text = regExp.Replace(RichTextBox1.Text, "\[i\](.+?)\[\/i\]")
Input should be: <i>blahblah</i> and output blahblah, but it gives me same text from richtextbox1 in richtextbox2. Anyone can see whats wrong in this code ?Cojba Reviewed by Cojba on . Regular Expressions in VB.NET 2005 ? 'Define regex Dim regExp As RegularExpressions.Regex 'Italic text regExp = New RegularExpressions.Regex("<i>$1</i>") RichTextBox2.Text = regExp.Replace(RichTextBox1.Text, "\(.+?)\") Input should be: <i>blahblah</i> and output blahblah, but it gives me same text from richtextbox1 in richtextbox2. Anyone can see whats wrong in this code ? :S Rating: 5HQLessons.Net + HQLessons.Com + 8months of HQ shared hosting - 30$
Selling two themaPosters for 25$ or 15$ for each. Payza(AP) only. Contact me :)
Respected and trusted members: wf?9, Jimmy, ramicn, Matijasevic, rkze1
Cheap desktop apps development. Contact via pm or msn.
-
24th Mar 2011, 05:31 PM #2BannedWebsite's:
google.comi done in C#
-
24th Mar 2011, 05:34 PM #3BannedWebsite's:
TehHost.netSystem.Text.RegularExpressions.Regex("<i>$1</i>")
-
24th Mar 2011, 05:35 PM #4BannedWebsite's:
google.comthis is for C#
if(!regex((^[1-9]{2}-[0-9]{3}-[0-9]{7}$).Success)) )
{
MessageBox.Show("Invalid phobe Number");
}
this some like validating
+92-61-4561239
-
24th Mar 2011, 05:36 PM #5Banned
lol VB.NET 05 doesn't have native regex support
-
24th Mar 2011, 08:10 PM #6OPMemberSystem.Text.RegularExpressions.Regex("<i>$1</i>")
lol VB.NET 05 doesn't have native regex supportHQLessons.Net + HQLessons.Com + 8months of HQ shared hosting - 30$
Selling two themaPosters for 25$ or 15$ for each. Payza(AP) only. Contact me :)
Respected and trusted members: wf?9, Jimmy, ramicn, Matijasevic, rkze1
Cheap desktop apps development. Contact via pm or msn.
-
24th Mar 2011, 11:37 PM #7ლ(ಠ益ಠლ)Website's:
extremecoderz.comyou shoud never ever use regex to parse html. the best and fastest way to parse strings is using IndexOf. There is a HTML agility pack that allows you to use xPath.
-
25th Mar 2011, 10:12 AM #8OPMember
tnx jayfella... lets try your way
HQLessons.Net + HQLessons.Com + 8months of HQ shared hosting - 30$
Selling two themaPosters for 25$ or 15$ for each. Payza(AP) only. Contact me :)
Respected and trusted members: wf?9, Jimmy, ramicn, Matijasevic, rkze1
Cheap desktop apps development. Contact via pm or msn.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
HostWired: Offering Shared Hosting since 2005 (USA)
By WebmasterPost.com in forum Shared Hosting OffersReplies: 1Last Post: 26th Oct 2012, 09:12 AM -
For 15 Days: 20% Lifetime Off Hosting & Free Site Move, Since 2005
By WebmasterPost.com in forum Shared Hosting OffersReplies: 0Last Post: 25th Sep 2012, 04:50 PM -
Since 2005, mastiland.com
By Vansh in forum Site ReviewsReplies: 7Last Post: 13th Mar 2011, 09:55 AM -
[Selling] Huge Website + Forums + Arcade = 130k members 20k topics & PR3 | Operating since 2005
By SMLMATS in forum Completed TransactionsReplies: 0Last Post: 13th Apr 2010, 05:27 PM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...