Reply to topic  [ 3 posts ] 
Wild Card use in Express 
Author Message

Joined: 2009-01-09 03:39:13
Posts: 4
In Express I can't figure out how to Replace with what used to be called 'Found 1', 'Found 2', 'Found 3' etc when I've searched using more than one wild card in a string.

Just using 'Found' to leave various letters or digits unchanged in Replace doesn't work.

Here is an example:
I want to find all instances where a hypen is used with a space either side of it, between numbers and letters as in:
9am - 3pm
I want to change the hyphens to the HTML code for an en dash: –

So I've input:
Find what: [[:alpha:][:digit:]] - [[:alpha:][:digit:]]
Replace with: \0–\0

This yields a correct find, e.g. m - 3
But it replaces that with: m - 3–m - 3
Instead of: m–3

(I hope this makes sense!)


2009-01-09 04:02:34
Profile
User avatar

Joined: 2007-01-17 03:25:42
Posts: 729
Does this set of PowerFind Pro find/replace expressions work the way you want?:

Find:
([[:alpha:][:digit:]])( - )([[:alpha:][:digit:]])

Replace:
\1–\3


2009-01-09 05:44:33
Profile

Joined: 2009-01-09 03:39:13
Posts: 4
Yes, Hamid: that works perfectly. Many thanks! :)


2009-01-16 06:10:53
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software