|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
RegExp
When using the RegExp object
when I do an execute, and it returns no matches, how do i test to see if it had no matches or not? Example set RExp = new RegExp gw = "4:00 -6" RExp.Pattern="h" Set Matches = RExp.execute(gw) For Each Match in Matches Response.write "Text " & match.value & " found at position " & match.firstIndex & "<br>" next This won't print anything, now how do i check to see if it didn't, so i can print so? I'd rather not use test, i'm sure there's a way to check to see if it's value is -1 or something but i can't quit seem to figure it out, anyone know? |
|
#2
|
||||
|
||||
|
Please use an appropriate subject title. You can read the sticky thread at the top of this forum for more information on how to post a question.
|
|
#3
|
|||
|
|||
|
I've viewed it, i figured since it was a general RegExp usage question and no posts of Regular Expression or RegExp have been done before, it was a suitable name, sorry, i'll be more descriptive next time, but hey, at least it's better than "i need help" or "vb problem". And the more specific the name gets it seems it gets less and less views, no one wants to help these days....
PS. If it were up to me, i'd change the name of the forum to Onslaught's Help Desk |
|
#4
|
||||
|
||||
|
lol
although your title was close, one word titles just aren't descriptive enough. As far as the amount of help this forum gets, it is relatively new and there seems to be more people requesting help than there are who can help. I, myself, have not used the regular expression object in vb or I would have also responded with an answer for you. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > How to test for no matches from regular expression (Use to be:RegExp) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|