![]() |
Regular Expressions -_-
Alright I looked this up, and I cant find a good resource for writing regular resourses in VB.NET, I did find how to write them though, but im not sure what to do... can someone point me in the right direction, or maybe know a resource I could use on writing reg expressions, because I just modified an example and no matter what I do its not working...
Heres what I wrote: :
Dim rxpFileFormat As New Regex("(\w+) (\(\w+\))")formFileNew.txtFileFormat is something like Text (.txt) and I am trying to define stFileFormat as what is between (), so with Text (.txt) it would become .txt. |
Got it working finally, I was way off. There was a lot of problems when there was nothing to fill the array with to, because when array(2) or something was called the program would crash because it doesnt exist, it was never filled in the split if the user entered an invalid pattern, so I finally had to ReDim it, and put a max size in the beginning, anyways heres what worked:
:
Dim stFileFormat(2) As String |
| All times are GMT -5. The time now is 11:27 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC