• 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
Re: Regular Expression in Xcode Editor: newlines+whitespace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regular Expression in Xcode Editor: newlines+whitespace


  • Subject: Re: Regular Expression in Xcode Editor: newlines+whitespace
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 3 Nov 2008 04:59:43 -0800


On 2008 Nov, 02, at 20:38, Chris Espinosa wrote:

Xcode doesn't do cross-line regex matches.


OH MY GOSH! Thank you, Chris. Now, after years of thinking I was too damned stupid to understand ICU Regular Expressions, finally I know why I always resort to BBEdit for serious regex jobs. (Well, I must admit that my feeble brain also relies on the regex syntax coloring provided by BBEdit in its Find window.)

(Neither does grep, for that matter.)

Yes, but everybody knows that's a geek tool. Besides BBEdit, Textual searching in Xcode has no problem crossing line endings. The "ICU User Guide" on the internet does not state this limitation either. Thanks again for enlightening me.


I have submitted two "wasn't helpful" documentation bugs: One on the Find window and one on the Project Find window, for not stating the 1- line limitation of Xcode Regex matching.

If you are looking for a pattern at the beginning of the line, use the regex "beginning of line" marker, "^". And of course you want to find runs of whitespace, not just the first instance, so the regex you want is

^\s+

Also thanks to Matthew for this.

Jerry

_______________________________________________
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


References: 
 >Regular Expression in Xcode Editor: newlines+whitespace (From: Jerry Krinock <email@hidden>)
 >Re: Regular Expression in Xcode Editor: newlines+whitespace (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: xCode shortCuts on spanish keyboard...
  • Next by Date: Re: xCode shortCuts on spanish keyboard...
  • Previous by thread: Re: Regular Expression in Xcode Editor: newlines+whitespace
  • Next by thread: Re: Regular Expression in Xcode Editor: newlines+whitespace
  • Index(es):
    • Date
    • Thread