RegEx object? 
Author Message
 RegEx object?

Hi,




Thanks in advance...



Thu, 13 Oct 2005 06:35:43 GMT  
 RegEx object?

Quote:

> Hi,




> Thanks in advance...


Dim rx
set rx = new RegExp

set matches = rx.Execute(sData)
for each match in matches
 wscript.echo match
next
--
Please respond in the newsgroup so everyone may benefit.
 http://dev.remotenetworktechnology.com
(email requests for support contract information welcomed)
 ----------
 Microsoft's new UNIFIED Terminal Services Newsgroup:



Thu, 13 Oct 2005 09:15:26 GMT  
 RegEx object?
Thanks Alex.


Can I have "tagname" only?



Quote:

> > Hi,




> > Thanks in advance...


> Dim rx
> set rx = new RegExp

> set matches = rx.Execute(sData)
> for each match in matches
>  wscript.echo match
> next
> --
> Please respond in the newsgroup so everyone may benefit.
>  http://dev.remotenetworktechnology.com
> (email requests for support contract information welcomed)
>  ----------
>  Microsoft's new UNIFIED Terminal Services Newsgroup:




Thu, 13 Oct 2005 12:21:48 GMT  
 RegEx object?

Quote:

> Thanks Alex.


> Can I have "tagname" only?


Dim rx
set rx = new RegExp

set matches = rx.Execute(sData)
for each match in matches
 wscript.echo match.submatches(0)
next

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US

Technet Script Center
http://www.microsoft.com/technet/scriptcenter/default.asp



Thu, 13 Oct 2005 13:08:39 GMT  
 RegEx object?
Hi Michael

Don't you think it's a bit greedy?



Quote:

> > Thanks Alex.


> > Can I have "tagname" only?


> Dim rx
> set rx = new RegExp

> set matches = rx.Execute(sData)
> for each match in matches
>  wscript.echo match.submatches(0)
> next

> --
> Michael Harris
> Microsoft.MVP.Scripting
> Seattle WA US

> Technet Script Center
> http://www.microsoft.com/technet/scriptcenter/default.asp



Thu, 13 Oct 2005 14:52:45 GMT  
 RegEx object?

Quote:


>> Thanks Alex.


>> Can I have "tagname" only?


> Dim rx
> set rx = new RegExp

> set matches = rx.Execute(sData)
> for each match in matches
>  wscript.echo match.submatches(0)
> next

Oops... :(

Thanks, Michael.

--
Please respond in the newsgroup so everyone may benefit.
 http://dev.remotenetworktechnology.com
(email requests for support contract information welcomed)
 ----------
 Microsoft's new UNIFIED Terminal Services Newsgroup:



Fri, 14 Oct 2005 01:16:02 GMT  
 RegEx object?

Quote:

> Hi Michael

> Don't you think it's a bit greedy?

Yes, but Alex wrote it, not me ;-)...

Any simple example posted with limited context provided by the OP will
nearly always need refinement when applied to an actual usage scenario with
real data.

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US

Technet Script Center
http://www.microsoft.com/technet/scriptcenter/default.asp

Quote:



>>> Thanks Alex.


>>> Can I have "tagname" only?


>> Dim rx
>> set rx = new RegExp

>> set matches = rx.Execute(sData)
>> for each match in matches
>>  wscript.echo match.submatches(0)
>> next

>> --
>> Michael Harris
>> Microsoft.MVP.Scripting
>> Seattle WA US

>> Technet Script Center
>> http://www.microsoft.com/technet/scriptcenter/default.asp



Fri, 14 Oct 2005 03:38:46 GMT  
 RegEx object?
Exactly, Michael. So Alex, you, or I might not show it. OP will say it if he
or she has something.



Quote:

> > Hi Michael

> > Don't you think it's a bit greedy?

> Yes, but Alex wrote it, not me ;-)...

> Any simple example posted with limited context provided by the OP will
> nearly always need refinement when applied to an actual usage scenario
with
> real data.

> --
> Michael Harris
> Microsoft.MVP.Scripting
> Seattle WA US

> Technet Script Center
> http://www.microsoft.com/technet/scriptcenter/default.asp




> >>> Thanks Alex.


> >>> Can I have "tagname" only?


> >> Dim rx
> >> set rx = new RegExp

> >> set matches = rx.Execute(sData)
> >> for each match in matches
> >>  wscript.echo match.submatches(0)
> >> next

> >> --
> >> Michael Harris
> >> Microsoft.MVP.Scripting
> >> Seattle WA US

> >> Technet Script Center
> >> http://www.microsoft.com/technet/scriptcenter/default.asp



Fri, 14 Oct 2005 03:50:01 GMT  
 RegEx object?
Actually I tried to make it NON-greedy and couldn't figure out how the
{*filter*}ens I needed to redo it... :(

Quote:


>> Hi Michael

>> Don't you think it's a bit greedy?

> Yes, but Alex wrote it, not me ;-)...

> Any simple example posted with limited context provided by the OP will
> nearly always need refinement when applied to an actual usage scenario
> with real data.




>>>> Thanks Alex.


>>>> Can I have "tagname" only?


>>> Dim rx
>>> set rx = new RegExp

>>> set matches = rx.Execute(sData)
>>> for each match in matches
>>>  wscript.echo match.submatches(0)
>>> next

>>> --
>>> Michael Harris
>>> Microsoft.MVP.Scripting
>>> Seattle WA US

>>> Technet Script Center
>>> http://www.*-*-*.com/

--
Please respond in the newsgroup so everyone may benefit.
  http://www.*-*-*.com/
(email requests for support contract information welcomed)
 ----------
 Microsoft's new UNIFIED Terminal Services Newsgroup:



Fri, 14 Oct 2005 23:55:37 GMT  
 RegEx object?

Quote:
> Actually I tried to make it NON-greedy and couldn't figure out how the
>{*filter*}ens I needed to redo it... :(


Dim rx
set rx = new RegExp
rx.global = True

set matches = rx.Execute(sData)
for each match in matches
 wscript.echo match.submatches(0)
next

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US

Technet Script Center
http://www.*-*-*.com/



Sat, 15 Oct 2005 08:09:34 GMT  
 RegEx object?
Ah - I was working with the '?' OUTSIDE the  ()... go figure.

Quote:


>> Actually I tried to make it NON-greedy and couldn't figure out how the
>>{*filter*}ens I needed to redo it... :(


> Dim rx
> set rx = new RegExp
> rx.global = True

> set matches = rx.Execute(sData)
> for each match in matches
>  wscript.echo match.submatches(0)
> next

--
Please respond in the newsgroup so everyone may benefit.
  http://www.*-*-*.com/
(email requests for support contract information welcomed)
 ----------
 Microsoft's new UNIFIED Terminal Services Newsgroup:



Sat, 15 Oct 2005 10:52:50 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Using VBScript 5.1 RegEx object in VB6?

2. RegEx object - Pattern Matching

3. RegEx Object in VBS 5.0 Beta

4. regex object

5. RegEx and Dictionary objects

6. RegEx - sorry to bother - found the solution

7. RegEx - my personal illogical nightmare

8. Using Regex to get a block of text

9. RegEx Capturing

10. How to split URL without http:// using RegEx?

11. Help with Regex.Replace pls...

12. RegEx Count

 

 
Powered by phpBB® Forum Software