Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9247817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:49:47+00:00 2026-06-18T09:49:47+00:00

AS3 | Adove Air 3.5 | Flash CS6 I have html pulled from a

  • 0

AS3 | Adove Air 3.5 | Flash CS6

I have html pulled from a source online put into a String that I’m taking apart piece by piece to build an XML file based off of the information I pulled. I need to search the whole String to remove characters following “info” up until the character “&”. There are multiple instances of this throughout the string, so I thought it would be best to use a RegExp. Other suggestions are welcomed.

//code from the website put into a full string
var fullString = new String(urlLoader.data);

//search string to find <info> and remove characters AFTER it up until the character '&'
var stringPlusFive:RegExp = /<info>1A2E589EIM&/g;

//should only remove '1A2E589EIM' leaving '<info>&'
fullString = fullString.replace(stringPlusFive,"");

The problem I’m having trouble figuring out is the “1A2E589EIM” is not consistent. They are random numbers and characters, and possibly length, so I can’t really use what I have written above. It will always lead up to a “&”.

Thanks in advance for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:49:48+00:00Added an answer on June 18, 2026 at 9:49 am

    I think the regexp would be more like

    //search string to find <info> and remove characters AFTER it up until the character '&'
    var stringPlusFive:RegExp = /<info>\w+&/g;
    
    //should only remove '1A2E589EIM' leaving '<info>&'
    fullString = fullString.replace(stringPlusFive,"<info>&");
    

    now, if you are going to parse your string to XML, you could wait until you have your XML structure and just remove the info string from ‘info’ nodes

    //code from the website put into a full string
    var fullString = new String(urlLoader.data);
    
    //parse to XML
    var xml:XML = XML(fullString),
        index:int, text:string;
    
    for each(var info:XML in xml.descendants('info')){
      text = info.*[0].text();
      index = text.indexOf('&');
      if(index != -1){
        info.*[0] = text.substr(index);
      }
    }
    

    I’m not sure about the affectation to *[0] but it should be something like that. Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using AS3 and Flash CS5 I have a messageboard Adobe Air desktop App with
I have a Adobe Air app (AS3, not Flex) that has 2 windows. When
I have created AS3 APP that works with http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html The application works fine on
OK We have a Adobe Air (AS3) application that runs our WPF application. but
I have a full screen AS3 game maby with Adobe AIR that runs in
in AS3, I have an external class ImageLoader, that loads an image upon request.
I have a Pure AS3 app that I'm deploying to both iOS and Android.
I am making a game in AS3 / Adobe AIR that requires the user
I've got an Adobe AIR application written in pure AS3 that has some functionality
I have flex sdk 4.6 installed and I want to compile AS3 class that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.