Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Classic asp - how to define a capturing group

Last post 10-10-2008, 11:32 AM by ddrudik. 2 replies.
Sort Posts: Previous Next
  •  10-10-2008, 5:56 AM 47071

    Classic asp - how to define a capturing group

    I am trying to extract text between two html tags (<span style='font-size: 1.25em;'> and </span>

    However I cannot seem to figure out how ASP defines groups such as (.*)

     Any ideas where I am going wrong?

     

    </p><p>With RegularExpressionObject
    .Pattern = &quot;&lt;span style=''font-size: 1.25em;''&gt;(.*)&lt;/span&gt;'
    .IgnoreCase = False
    .Global = True
    End With</p><p>

  •  10-10-2008, 11:27 AM 47076 in reply to 47071

    Re: Classic asp - how to define a capturing group

    bfsog:

    I am trying to extract text between two html tags (<span style='font-size: 1.25em;'> and </span>

    However I cannot seem to figure out how ASP defines groups such as (.*)

     Any ideas where I am going wrong?

     

    </p><p>With RegularExpressionObject
    .Pattern = &quot;&lt;span style=''font-size: 1.25em;''&gt;(.*)&lt;/span&gt;'
    .IgnoreCase = False
    .Global = True
    End With</p><p>

    In VBScript groups are in the SubMatches collection of the Match object. Also your regex will over match if there is more than one span on a line.


    Michael

    "In theory, theory and practice are the same. In practice, they are not."
    Albert Einstein
  •  10-10-2008, 11:32 AM 47079 in reply to 47071

    Re: Classic asp - how to define a capturing group

View as RSS news feed in XML