A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: AS3 Regex Match

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Posts
    23

    AS3 Regex Match

    I am trying to get a regex match on HTML code that is parsed into a text box in flash. I have successfully loaded the HTML code and then began the regex matching, but am stuck on getting the right regex expression to match.

    The code that I am using in html page builds a tree view list on the html page, so once it's loaded into the flash text box, i am trying to match the html pages to build a list from. The code below is what I am trying to match. The code I want to match is the first two items in quotes for each entry to build the array list of page names, and their URL. The problem is that the pages won't be named as nice as the example below. Each time it can be a different page name, and page url, so I need to match what is in the first two quotes.

    I can't find any examples of the regex expression to do this.

    Code:
    insertEntry(aux2, NewLink("Page 1", "Page1.html", "page"))
    insertEntry(aux2, NewLink("Page2", "Page2.html", "page"))
    insertEntry(aux2, NewLink("Page3", "Page3.html", "page"))
    insertEntry(aux2, NewLink("Page4", "Page4.html", "page"))

  2. #2
    Senior Member
    Join Date
    Feb 2006
    Location
    Düsseldorf, Germany
    Posts
    142
    hey,

    check this String function:
    http://goo.gl/yWV5w

    also you need to check this library:
    http://goo.gl/yWV5w
    --
    there is a place for those who dare to dream...

    Flash Developer
    VISTAPARK GMBH
    BÄRENSTRASSE 11-13
    D-42117 WUPPERTAL

  3. #3
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    Can you give an example of the ugliest possible entry you can get? And it's the first two quotes so "Page 1" and "Page1.html" right?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center