• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Regular Expression in Xcode Editor: newlines+whitespace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Regular Expression in Xcode Editor: newlines+whitespace


  • Subject: Regular Expression in Xcode Editor: newlines+whitespace
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 2 Nov 2008 19:42:58 -0800

Whenever I need to do any serious regex search/replace I have to switch to BBEdit because I can never get Xcode's to find expected results. Solving the following simple mystery might be a big help:

Find: \n   This finds a newline.  Great.

Find: \s   This finds a whitespace.  Great.

Find: \s*\n  This finds trailing whitespaces at end of lines.  Great.

But

Find: \n\s
   Expected Result:  Should find any newline followed by a
      whitespace -- roughly, any indented line.
      I have lots of those!
   Actual Result: NSBeep().  Never finds anything.

How can I get my expected result?

Thanks,

Jerry Krinock _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Regular Expression in Xcode Editor: newlines+whitespace
      • From: Chris Espinosa <email@hidden>
    • Re: Regular Expression in Xcode Editor: newlines+whitespace
      • From: Matthew Morse <email@hidden>
  • Prev by Date: Re: Failed to launch simulator: Operation failed with underlying error -43.
  • Next by Date: Re: Regular Expression in Xcode Editor: newlines+whitespace
  • Previous by thread: Re: Failed to launch simulator: Operation failed with underlying error -43.
  • Next by thread: Re: Regular Expression in Xcode Editor: newlines+whitespace
  • Index(es):
    • Date
    • Thread