Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RegExp search and replace?



Fredrik Olsson wrote on Monday, July 10, 2006:

>How do I (or can I) search and replace with regular expression capture 
>groups?

    search: regex(regex)regex(regex)
    
    replace text\1text\2
    
Example:

    text:       kFingerOne = 1,
                kFingerTwo,
                kFingerThree
    
    regex:      kFinger(.*)\b
    
    replace:    kToe\1
    
    results:    kToeOne = 1,
                kToeTwo,
                kToeThree

James Bucanek
____________________________________________________________________
Author of Beginning Xcode                           ISBN: 047175479X
<http://www.beginningxcode.com/>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >RegExp search and replace? (From: Fredrik Olsson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.