Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 15th, 2001, 03:25 PM
d0g1e d0g1e is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: The Netherlands
Posts: 8 d0g1e User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to d0g1e
Question Hexadecimal chars in regexp

I'm having a little trouble with regular expressions:

Code:
$string = "blablablablablablaB6"; (B6 = hex char B6)
if($string =~ m/\xB6/) {
  do this;
  do that;

  $string =~ s/\xB6//g;
}


the B6 char should be removed from the string, but it doesn't work!?!

Why doesn't $string =~ s/\xB6//g; work?

Reply With Quote
  #2  
Old October 15th, 2001, 03:54 PM
bumperbox bumperbox is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Tauranga, NZ
Posts: 349 bumperbox User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
try removing the \x
$string =~ m/B6/;
$string =~ s/B6//g;

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Hexadecimal chars in regexp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT