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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to