Regular Expressions
Regular Expressions
- Subject: Regular Expressions
- From: Philip Juel Borges <email@hidden>
- Date: Mon, 22 Feb 2010 14:08:26 +0100
Hi,
Xcode supports the use of regular expressions. With the following
search and replace I can find a string, like John 17:17, and turn it
into a link:
Find
([a-z]+) ([0-9]+):([0-9]+)
Replace
<a href="file:///Library/\1/\2.html#\3">\1 \2:\3</a>
This works fine. But right after Library I want to insert another
folder comprised of the first two letters of John. So after the search
and replace I'd like to get:
<a href="file:///Library/Jo/17.html#17">John 17:17</a>
Is it possible in the replace field to extract the first two letters
of the first pattern, i.e., ([a-z]+)?
--Philip
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden