• 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: search in file with regular expression
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: search in file with regular expression


  • Subject: Re: search in file with regular expression
  • From: James Bucanek <email@hidden>
  • Date: Tue, 27 Dec 2005 11:25:02 -0700

Dmitry Markman wrote on Tuesday, December 27, 2005:
>I tried to use the following pattern
>^[[:space:]]* (XCode 2.2)
>
>but xcode complains:
>Single File Find
>The regular expression "^[[:space:]]*" matches the
>empty string. Regular expressions for searches must
>not match the empty string.
>
>is it a bug or feature?

It's a requirement of the regex library the Xcode uses. As the error message explains, you can't use a regex that matches "nothing" or -- well -- it will.

>I just wanted to remove all leading spaces in some file
>bbedit did it without complain

    ^[[:space:]]+

... or use BBEdit. ;)

--
James Bucanek
 _______________________________________________
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: 
 >search in file with regular expression (From: Dmitry Markman <email@hidden>)

  • Prev by Date: Re: Xcode 2.2 is now available [Part 2]
  • Next by Date: Re: Weak linking and NULL pointers
  • Previous by thread: search in file with regular expression
  • Next by thread: search in file with regular expression
  • Index(es):
    • Date
    • Thread