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 9270301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:20:05+00:00 2026-06-18T15:20:05+00:00

AS3 | Flash CS6 | Adobe Air 3.5 I have a very long string

  • 0

AS3 | Flash CS6 | Adobe Air 3.5

I have a very long string that will eventually be formatted as XML. In the string I have several instances of something along the lines of:

<title>Some title</title>

//the following line would need changed
<title>Some title</garbage>

<title>Some title2</title>
<title>Some title3</title>

//the following line would need changed
<title>Someone's title & (his info)</garbage>

//the following line should NOT change
<another title>something else</garbage>

I need to search and replace all of these:

<title>(whatever is here)</garbage>

And make them:

<title>(whatever is here)</title>

As you can see I can’t simply search and replace “garbage” beacuse it wouldn’t apply in every single instance… I only want to replace the ones that use < title > …not < another title > Also please note that it is uncertain what characters will be between < title > and < /garbage >

So although I know this doesn’t work… I was thinking something along the lines of:

str = str.replace(/<title>\w+<\/garbage>/, "<title>\w+<\/title>");

I think the answer is under “Capturing sub-strings” on this page but so far no luck:
http://www.sevenson.com.au/actionscript/testing-regular-expressions/

It seems like at this point I’m just plugging in random things so it makes more sense to just ask for help.

Any advice is appreciated.

  • 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-18T15:20:06+00:00Added an answer on June 18, 2026 at 3:20 pm

    Match any symbol after <title> and before </garbage>

    str = str.replace(/(<title>.[^<]+)<\/garbage>/, "$1</title>");
    

    Example http://regexr.com?33nog

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

Sidebar

Related Questions

I have made a game in flash CS6 using AS3 and Air 3.2 for
using AS3 and Flash CS5 I have a messageboard Adobe Air desktop App with
AS3 | Adove Air 3.5 | Flash CS6 I have html pulled from a
Im using adobe flash / AS3 This animation will be used as a autorun
In AS3 flash - I have a textField with a CSS in it that
I have a Flash AS3 application that uses FileReference.browse() to request a SWF from
I have written a game in Flash (AS3/Flex SDK/MXMLC) that streams music and sound
Using Adobe Flash Professional CS6, AS3 Please let me know if I need to
I've created a Flash application (AS3) in CS6 (Mac) that performs as expected when
I have a AS3 flash app that needs to create a folder/path (online) for

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.