Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (http://www3.telus.net/pfrank)
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

searching for hi order ASCII using \x

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions
View previous topic :: View next topic  
Author Message
bitmonger



Joined: 03 Oct 2007
Posts: 3

PostPosted: Sat Oct 22, 2011 2:23 am    Post subject: searching for hi order ASCII using \x Reply with quote

I'm trying to search for in a filename to replace with a simple dash -
The is supposedly is ASCII hex 97. When I run a regex replacement in PFrank and put the actual character in the search string it finds and replaces it. When I then check the detailed information - show hex codes, it shows the as (\x2014).
When I then put \x2014 in the search string instead of it no longer matches. If I use \x{2014}
it comes back with an error bogus escape: u"\\x"
If I use \u2014 it also does not match.
I am trying to get the \x or \u working for some other characters that don't print to screen, but am finding this extremely frustrating.
Even finding out the proper code for these is a challenge.
Any suggestions?

Thanks
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 446
Location: Canada

PostPosted: Sat Oct 22, 2011 5:48 pm    Post subject: Reply with quote

Sorry - it looks like hex code replacement only works with codes that have 2 characters. eg. \x30

I tried different ways to try make \x2014 work but was unsuccessful. THis is a limitation of the python regex library.

For the case of '' or any other printable character, you can just paste the character (instead of the hex code) into the search or replace column of the renaming creator.
It doesn't look like there is any way to search for unprintable characters unless the corresponding hex code is only 2 characters.

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com