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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:13:24+00:00 2026-06-17T12:13:24+00:00

I try to check if a string is part of a codepage like CP1254

  • 0

I try to check if a string is part of a codepage like CP1254 or CP1250:

//cp1250
public static const CP1250_REGEXP:RegExp = /[\u00A0\u00A4\u00A6-\u00A9\u00AB-\u00AE\u00B0\u00B1\u00B4-\u00B8\u00BB\u00C1\u00C2\u00C4\u00C7\u00C9\u00CB\u00CD\u00CE\u00D3\u00D4\u00D6\u00D7\u00DA\u00DC\u00DD\u00DF\u00E1\u00E2\u00E4\u00E7\u00E9\u00EB\u00ED\u00EE\u00F3\u00F4\u00F6\u00F7\u00FA\u00FC\u00FD\u0102-\u0107\u010C-\u0111\u0118-\u011B\u0139\u013A\u013D\u013E\u0141-\u0144\u0147\u0148\u0150\u0151\u0154\u0155\u0158-\u015B\u015E-\u0165\u016E-\u0171\u0179-\u017E\u02C7\u02D8\u02D9\u02DB\u02DD\u2013\u2014\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2026\u2030\u2039\u203A\u20AC\u2122]/;

//cp1254
public static const CP1254_REGEXP:RegExp = /[\u00A0-\u00CF\u00D1-\u00DC\u00DF-\u00EF\u00F1-\u00FC\u00FF\u011E\u011F\u0130\u0131\u0152\u0153\u015E-\u0161\u0178\u0192\u02C6\u02DC\u2013\u2014\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2026\u2030\u2039\u203A\u20AC\u2122]/;
var stringValue = "Lorem ipsum"

if( CP1250_REGEXP.exec( stringValue ) ) {
trace( "is cp1250" );
}

if( CP1254_REGEXP.exec( stringValue ) ) {
trace( "is cp1254" );
}

But exec() only returns if one of the chars from stringValue has a char of the regexp pattern. And test() returns if the first char of the stringValue is equal.

In short:
My aim is to check if all of the stringValue chars are equal to the pattern / part of the codePage.

But I am stucked at this point.

  • 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-17T12:13:25+00:00Added an answer on June 17, 2026 at 12:13 pm
    [\u00A0-\u00CF\u00D1-\u00DC\u00DF-\u00EF\u00F1-\u00FC\u00FF\u011E\u011F\u0130\u0131\u0152\u0153\u015E-\u0161\u0178\u0192\u02C6\u02DC\u2013\u2014\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2026\u2030\u2039\u203A\u20AC\u2122]
    

    Matches any character in the set exactly once. Add a * to the expression to recognize any number of them (including 0, use + instead for 1 or more), and to consume the entire input, start with ^ (start of line) and end with $ (end of line), so like:

    ^[chars]*$
    

    or, with your character set:

    ^[\u00A0-\u00CF\u00D1-\u00DC\u00DF-\u00EF\u00F1-\u00FC\u00FF\u011E\u011F\u0130\u0131\u0152\u0153\u015E-\u0161\u0178\u0192\u02C6\u02DC\u2013\u2014\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2026\u2030\u2039\u203A\u20AC\u2122]*$
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

try: spam.foo except AttributeError: do_somthing() (Is it wise to check an attribute like that
How do I check if part if one string is equal to another? For
I commit all my files into bitbucket. i try check in,revert file i deleted
I am using the compareTo method in Java to try and check if a
What the heck does obstructed mean when you try to check into Subversion? I
For some reason, when I try to check a file against FileAttributes.Normal, it seems
I try to create unit test cases to check my table values are correct
I want to try db connection to check is db available. In zend I
When I try to access my site, then check my Heroku logs, I see
I am trying to check the security of my MVC application. When I try

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.