Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Perl: search for 8bit characters in lines from a text file

Posted on 2007-10-02
Medium Priority
Last Modified: 2008-01-09
I'm trying to figure out the best way to search for 8bit characters in a line of data in a text file, but I'm not sure if I'm doing it right or not.  The one test I'm doing is this:

if($line =~ /\x8E/) {

I don't have access to the Encode::Unicode perl module, so I can't put that in my script.  Is the above the correct way to search for 8bit characters in a line?
Question by:texasreddog
  • 2
LVL 24

Expert Comment

ID: 20001527
yes. That should work fine
LVL 24

Accepted Solution

mankowitz earned 1000 total points
ID: 20001537
To search for unicode, you can match \x{3FB} or whatever.

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question