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

  • SEARCH
  • Home
  • 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 288315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:48:17+00:00 2026-05-12T05:48:17+00:00

I am working on this bit of code that checks a line of actionscript

  • 0

I am working on this bit of code that checks a line of actionscript 3 code for the existance of a type (MovieClip, Sprite, along with the custom classes defined in the classpath) that is in a collection that is being iterated.

for (String type: typeList) {
    if (input.contains(type)) {
        // dome something here
    }
}

The problem is, some of the custom type names also contain the name of another type:

Custom type: fSceneController
Contains flash type: Scene

So the .contains method will not work properly. I was thinking of using a regex inside the loop where the pattern checks for the type and makes sure that there are no a-zA-Z0-9 immediately before or after the type.

Pattern p = Pattern.compile("<stuff here>"+ type + "<more stuff here>");

Can anyone help me determine what i should put before and after the type so that the type itself can be detected distinctly from other types that may contain part of the text?

Or perhaps suggest a different method that i can use to accomplish the same goal?

  • 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-05-12T05:48:18+00:00Added an answer on May 12, 2026 at 5:48 am

    Not sure I’m clear on what you’re trying to do, but I think this is what you’re missing

    If you want a word in a regex and just the word, then put \b in front and in back, for instance

    \bhe\b will only match the first of...
    
    he
    she
    the
    they
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a bit confused as to why this isn't working; I assume that because
I have a bit of code that checks if a user is in the
This is a bit of a generic question. I am working on an iOS
Hey guys this is a bit of a homework puzzle I'm working on and
This feature worked a bit, then stopped working. Background: Given a user is logged
I feel a bit stupid but this is not working (and I expected it
i am new in programming under linux and trying to get working this code:
I have a bit of code for a dll that is needed by two
I have a command-line utility that gets quite a bit of downloads from my
I am working through Head First Rails and I came across some code 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.