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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:52:04+00:00 2026-05-28T03:52:04+00:00

In AS3, I have created a nice swear filter routine that imports a list

  • 0

In AS3, I have created a nice swear filter routine that imports a list of regular expressions for swear words and combines them into a single regular expression. However, one bit I’m having problem over are football teams, namely ARSENAL and SCUNTHORPE.

Is there a way in a regular expression to block the swearwords unless they complete the words to be the above? I tried the following with ARSENAL but it didn’t work properly:

/arse[^(nal)]/gi

The problem is that I cannot parenthesise the letters “nal” because it sees the parentheses as characters rather than a block. It appears to expect at least one extra character after “arse” in order to work. Can I make it so that it will allow one but not the other? How can I group letters together and say “not”?

EDIT: I found elsewhere on Stack some talk of “negative lookahead”s but didn’t quite get how I could do that for these two use cases… Any ideas?

  • 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-28T03:52:04+00:00Added an answer on May 28, 2026 at 3:52 am

    I don’t know about Actionscript specifically but in most Regex engines you can use

    negative lookahead: ?!

    negative lookbehind: ?<!

    So for Arsenal:

    /arse(?!nal)/gi 
    

    And Scunthorp or sHAPPYhorp:

    /HAPPY(?<!sHAPPY)(?!horp)/gi 
    

    And Scunthorp will be similar to sHAPPYhorp, left as an assignment for the reader.

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

Sidebar

Related Questions

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
I have created an API in AS3 that uses Flex bindings. The API is
I have create a custom contextMenu using AS3 and can apply that to the
I have a AS3 swf [1] that is loading another AS2 swf [2] which
I have created a graph component in AS3 which extends UIComponent. I created an
I have created a flash movie in AS3, I wanted to have a seek
I am starting with AS3 programming icm with Flash Builder 4. I have created
I have an AS3 program that calls a function multiple times. The function must
I have created a small flash CS4 project that has a few custom components
I have created a FLV video player using the AS3 flash.media.Video object (not the

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.