How do I remove a space before the first word in a sentence using find and replace or GREP?

Right, so I am laying out a document in inDesign from a word document and it has a space before every first word in a sentence. It is really annoying and I need a quick way to get rid of them. I wasn't too sure how to do it with find/change but I am sure there is a way in GREP if someone can help me. I have included an image so that people can see exactly what I mean.

The ^ location works for all paragraphs.
But a note to the OP, there is a sample script called FindChangeByList that removes leading and trailing spaces as well as extra spaces after punctuation, all in one go. But if you want to continue to use a GREP find/change to remove leading space, I'd modify Joel's suggestion to ^\s+ to get those cases where the user typed multiple spaces as well.
And don't forget there are actually legitimate places for leading tabs, which both the script and this GREP will find and remove, so be careful.

Similar Messages

  • How do I get Pages to capitalize the first word of a sentence and the letter 'I?"

    How do I get Pages to capitalize the first word of a sentance and the letter "i" automacticly?

    I am also having this problem. Does anyone have an answer?
    I jus upgraded from Pages 4.3 and it's in Preferences. Not so in Pages 5.0.

  • How can I make iTunes sort on the first word by default, even though that word is "The" or "A"?

    How can I make iTunes sort on the first word by default, even though that word is "The" or "A"?
    I myself think that (for instance) "A tribe called Quest" should be sorted under "A", not "T".
    Now I can edit the sort options manually per track and/or per selection, but I would really like to just kill this "iTunes-knows-how-you-should-sort"-feature in iTunes.
    Anyone any suggestion on how to do that?
    Thanks

    Here is a modified version of one of Doug's Scripts. My modification was to add Sort Name to the list of tags that could be changed. I tried it on a single track and it worked. I recommend backing up your library first. Select the tracks you want to change (or all tracks) and run the script from the Applescript Editor.  If it works as intended, save it so you can apply it to newly imported tracks.  And, yes, I know this isn't the exact answer to your question, you want to change a preference setting in iTunes (if there is such a setting).
    Original script can be forund at http://dougscripts.com/itunes/scripts/ss.php?sp=thistagthattag
    Modified script is below. Start up Applescript Editor, paste it into a new window.  Start up iTunes and select the tracks to modify.  Click Run in the Applescript Editor.  Follow the instructions.
    (* Put This In That
    v2.0 april 22 2008
    - runs as universal binary
    - adds "Show" tag
    - consolidated code
    - saved as script bundle
    v1.7 October 3, 2006
    - adds "Album Artist" as option
    v1.6 October 28, 2004
    - works around iTunes 4.7 selection bug
    v1.5 ('04/1)-- adds "grouping" tag
    Get more free AppleScripts and info on writing your own
    at Doug's AppleScripts for iTunes
    http://dougscripts.com/itunes/
    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
    Get a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    or visit http://www.gnu.org/copyleft/gpl.html
    -- CONSTANTS
    property allOptions : {"Song Name", "Artist", "Album", "Album Artist", "Composer", "Genre", "Comments", "Show", "Grouping", "Sort Name"}
    property my_title : "Put This In That"
    global thisTag, thatTag, theNewTags, theOriginalTags, yn
    tell application "iTunes"
              if selection is not {} then -- if tracks are selected...
                        set sel to selection
                        set numTracks to (length of sel)
                        set s to "s"
                        if numTracks is 1 then set s to ""
                        display dialog "The data from one tag REPLACES the data in another tag in all the selected tracks, with option to delete data in first tag." & return & return & (numTracks & " track" & s & " selected.") buttons {"Cancel", "Continue"} default button 2 with title my_title giving up after 30
                        if gave up of result is true then return
                        my choose_this_tag()
                        my choose_that_tag()
                        set yn to (button returned of (display dialog "Delete data in " & thisTag & " afterwards?" buttons {"Yes", "No"} default button 2 with title my_title giving up after 45) is "Yes")
                        set oldfi to fixed indexing
                        set fixed indexing to true
                        repeat with t from 1 to numTracks
                                  tell contents of item t of sel
                                            set theOriginalTags to {get name, get artist, get album, get album artist, get composer, get genre, get comment, get show, get grouping, get sort name}
                                            set theNewTags to theOriginalTags
                                            my do_put()
                                            set {name, artist, album, album artist, composer, genre, comment, show, grouping, sort name} to theNewTags
                                  end tell
                        end repeat
                        set fixed indexing to oldfi
              else
      display dialog "No tracks have been selected." buttons {"Cancel"} default button 1 with icon 0 giving up after 30
              end if -- no selection
    end tell
    to choose_this_tag()
              tell application "iTunes"
                        set n to (choose from list allOptions with prompt ("Select a tag to get data from:") with title my_title)
                        if n is false then error number -128
                        set thisTag to (n as text)
              end tell
    end choose_this_tag
    to choose_that_tag()
              set o to {}
              repeat with t in allOptions
                        if (t as text) is not thisTag then copy t to end of o
              end repeat
              tell application "iTunes"
                        set n to choose from list o with prompt ("Use data from the " & thisTag & " tag to REPLACE data in...") with title my_title
                        if n is false then error number -128
                        set thatTag to n as text
              end tell
    end choose_that_tag
    to do_put()
              try
                        repeat with i from 1 to (length of allOptions)
                                  if thisTag is (item i of allOptions) then
                                            set thisTag_sto to (item i of theOriginalTags)
                                            exit repeat
                                  end if
                        end repeat
                        repeat with i from 1 to (length of allOptions)
                                  if thatTag is (item i of allOptions) then
                                            set (item i of theNewTags) to thisTag_sto
                                            exit repeat
                                  end if
                        end repeat
                        if yn then
                                  repeat with i from 1 to (length of allOptions)
                                            if thisTag is (item i of allOptions) then
                                                      set (item i of theNewTags) to ""
                                                      exit repeat
                                            end if
                                  end repeat
                        end if
              end try
    end do_put

  • Apple Mail - how to get the first word in a sentence to auto-capitalize

    How to get the first word in a sentence to auto-capitalize
    Anwar

    something to look forward to then, because we get used not to use our shift button any more, since iPhone and iPad do it for us. entourage and other ms stuff do it. pages does it too now (put it on in the auto-correct in preferences). bizarre however some loose the capitalization when you copy the text. pages to stickies or mail does not. that's good !

  • How can I get Mail to capitalise the first letter of a sentence?

    Hello all,
    this is my first time using apple Support Community.  i am a new apple user and have just got my first MacBookPro (its wonderful).  however, i am having some difficulties. 
    How can i get Mail to capitalize the first letter of a sentence and also capitalize 'i' as 'I' automatically?
    Also, how can i get apps like Pages to do the same? and for that matter typing into internet sites like this one? look at the lack of automatic punctuation!!
    Thank you all for any advice and tips you may have. 
    Paul.

    I don't think whether it's easier or not is really an issue.  The problem is that all of these wonderful technologies are taking away our understanding of how to communicate in writing.  It's not a matter of being lazy and not "wanting" to do it, but rather getting to a point where many people "can't" do it.
    I certainly wasn't pointing any fingers.  I use a calculator (or computer if I happen to be on one at the time) to do the most basic math calculations.  I can be out to lunch with co-workers and we have to pull out a calculator to split a bill 4 ways.  I went through school at a time when calculators were not permitted.  So, at one time, I could have easily done all of that stuff in my head.  So far as math goes, my mind has turned to mush a long time ago.  I doubt I could work my way through a long division problem at this point... even if I sat there and really tried.
    Computers were not generally consumer items when I was growing up.  So I didn't grow up in a world with spell checking.  I have certainly grown to use it though and I'm sure my ability to spell properly has diminished somewhat because of it.  I tend to be less careful when typing something out.  If I'm not sure of the spelling on something, I just let my computer either fix it or give me a suggestion for the corrected spelling.  Fortunately, I grew up having to rely on my own ability to spell, so with that foundation, I tend to do fairly well when it comes to spelling.
    We're at a point now where systems can correct grammar and sentence structure.  I think all of these are great tools to help us out, but they shouldn't be used to take the place of actually knowing how to do things.  Having said that, I'm fairly sure that is exactly what will happen.  Just as today, I rely almost entirely on some form of electronics for everyday math, I'm sure people growing up today with expert systems able to correct everything will rely on those equally.

  • Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.

    Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.

    Gavin Lawrie wrote:
    Once it had been established that the iWork rewrite had resulted in some features being lost and others broken, and once Apple had acknowledged the concerns* and suggested they are working on fixes**, I'm not sure what else there is to achieve.
    You are writing that in the perspective of having read about it here already. Repeated often enough that you encountered it somewhere in the posts.
    Users are flooding in here and don't know any of this. Of course we have to repeat everything endlessly.
    Because I like to give precise, understandable and workable answers to repeated questions, and Apple doesn't allow sticky posts here, I created a separate forum which users can consult to look up real answers, and contribute for themselves if they have something valuable to add:
    http://www.freeforum101.com/iworktipsntrick/
    There is a section purely devoted to Pages 5. Add whatever answers you feel will lighten the problems of Apple's 'upgrades'.
    Peter
    * Where have they acknowledged anything?
    ** They have barely anything listed, compared to the massive list of deleted features, and nothing but an extraordinarily long time frame considering they created the problems here and now. Apple has not said they will do anything at all about fixing the real issues, the biggest of which is that the new iWork apps break virtually all the work of existing users.

  • Help with removing a variable number using "find and replace"

    Hey, I have to remove a variable number from a large number of documents.
    How would I do this using "find and replace"
    <text><![CDATA[Coloured 250]]></text>
    250 is an example of the variable number that I will need to remove so it looks like this:
    <text><![CDATA[Coloured]]></text>
    Note: the text "coloured" is subject to change also.
    Thanks

    That's a possibilitly I'll explore.  Thanks for the alternate perspective!
    (5 minutes later)
    Oh well, it was a good thought.
    Unfortunately each line of raw original text may contain from 1 to 4 lines of final text.  In other words there is no consistency in the number of backslashes (hard returns) in each line of original text, and thus, when backslashes are converted to commas, no consistency in the number of data elements in each data set. 
    Sadly PS variables will not handle finding a source text line that does not have data for 4 variables.  So I either have to go back and add enough commas on each short line to make four individual data elements for each data set... or I simply deal with the hard returns within Photoshop.
    I think I've reached the limit of automation on this process.

  • Is there a way to capitalize just the first word on a sentence on Pages v5.2?

    I'm sort of new to iwork, but i've been working with word for a long time and i know it very well.
    In word there is a tool in which you select a paragraph and you can capitalize the first word of each sentence.
    Is there a way i can do the same with pages v5.2? Pages would only let me capitalize each word of the selected paragraph.
    Thanks

    The previous major version of Pages (Pages '09 version 4.3) could automatically capitalize the first word of each sentence as you typed. That capability and a number of others was lost with the release of Pages v 5. You may still have the older version available in your Applications folder. You may also want to switch to Word or Open Office (free), both of which will likely be more familiar if you have worked with Word before.

  • The system doesn't recognize or capitalize the word (I) or the first word of every sentence. Another really annoying thing about the integrated mail on your Mac computers is the fact that the system learns the word as you type it more and more instead of

    The system doesn’t recognize or capitalize the word (I) or the first word of every sentence. Another really annoying thing about the integrated mail on your Mac computers is the fact that the system learns the word as you type it more and more instead of highlighting it as incorrectly is this is a word that’s being misspelled. Can Apple fix this bug to make it user friendly as if you were using Office or a Word Document?

    You hit the target CT.
    It’s only fair that if Apple is going to integrate Mail into Mac PCs, it would be nice if the system does it for you like Office or perhaps Outlook. I just don’t to use Outlook although I have it installed and ready to use, but instead use Mail which comes with Mac OS already.
    I hope to make some sense here.

  • How can I create an action that uses "Find and replace"?

    Hi there,
    I'm trying to create an action that will use "Find and replace" to change certain words and phrases in my .psd-files. These are words and phrases I change a lot (I'm translating emails and website banners) and I would like to speed up that process using actions.
    When I tried to create the action I got the error message "The object "in contents of all text layers" is not currently available".
    Then I tried "insert menu items" and chose "Find and replace" and then did my change, but then it stopped when the FAR-window popped up. That's what I want to skip, so it just changes my words and phrases that I want.
    Is this possible?
    Best,
    Carl

    Anyway, in the Script in that other thread the function replaceText takes two Strings, so something like
    function main () {
    var myDocument = app.activeDocument;
    replaceText ("replace this", "with this")
    would be a possibility.

  • How do I remove a podcast from the first screen?

    I don't want to just delete podcasts - i finally figured that out. I want to delete the whole subscription so it does not show up any more on my catalog screen.
    I deleted it from itunes, but it does not seem that itunes syncs with the new podcast app.

    (on an iPhone 4s with ios6)  Not really the catalog screen.   Actually is a Library view.  And one may not see an Edit button, if one is in the middle of the list of podcasts.
    Unstated, in the Library list podcasts, if one scrolls to the top of the fat podcast icons, before the first ones, then one sees Edit come into view.  For that matter,  the line with Edit also has the search box and can also change that view from fat podcast icons (4 showing) to a list view (about 7).     If in list mode, then  pushing Edit gives one red minus, press that, and gets a Delete choice..  If fat icon view mode, or an x shows up, pressing that, and wham it be gone.   No chance to for second thoughts.  What did I delete?   Don't know.
    On iPad, finding the Edit button is easy.   If viewing the podcasts, either way, the Edit button stays in the upper left location and can be seen.    No scrolling needed.

  • How do I set Pages to capitalise the first word of a new paragraph

    Does anyone know how I set Pages to capitalise the first word of a new paragraph.

    Hi Peter
    That worked, thank you
    However, what I was wanting was to set Pages to start every new paragraph with a capital letter
    Any ideas?
    Thanks

  • How to use Find and Replace for CR or TAB

    How can I use PAGES 'Find and Replace' function to eliminate unwanted carriage returns or Tabs?
    I tried to copy the backwards P and paste into Pages find window, but that doesn't work.
    eMac   Mac OS X (10.4.4)   1 G RAM

    Copying & pasting should work, but it isn't necessary. In the Find & Replace fields hold down the Option key & hit the return or tab key.
    Peggy

  • How do you auto capitalize in the new version of pages? It no longer capitalizes the first word in each sentence and "I".

    I just updated to the new version, and this problem occurred right away. Please help!! 

    Congratulations on discovering the first of over 90 + features removed from Pages by Apple:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&mforum=iworktipsn trick
    Your previous version of Pages should still be in your Applications/iWork folder. It actually works.
    Peter

  • I have never used indesign to type in text on the spine of a book for submission as a book cover with the POD company Lightning Source. I would be so grateful if someone could tell me how to do this. This is the first time I have ever used a forum.

    Help! How do I type in text on the spine of a book cover template in indesign?

    1. Determine the spine width first. Note that the spine width is relative to the thickness of the paper used for printing. For example, your book is of 300 pages, the spine thickness varies relative to paper thickness (say, 60gsm paper or 70gsm paper, or thicker art paper varieties). Get in touch with the Printer to give you a bound dummy (blank pages) with as many number of pages as your book has. Measure the spine manually from it. When you are more experienced, you would be able to calculate the thickness just by knowing the paper thickness (multiply by number of pages of the book).
    2. Create a spread to represent the back cover (left) and front cover (right). Increase the width of either the left page or right page, to make it exactly the width of book + spine width. Use guides to separate the spine from the cover design area. Type the spine matter and rotate the frames to fit to the spine. Rotation of frames should be in such a way that when the book is kept on table with its front cover on top, the spine text matters should be erect (not be upside down). On completion the whole design should have the bleed area on all four sides, left page as back cover, spine in the middle with rotated text frames, right page as front cover.
    OR
    3. You can also make the spine a separate page. Create a page exactly of the width of spine. Go to Pages panel fly-out and uncheck "allow document pages to shuffle". Arrange the three pages, the back cover the spine and the front cover in that order side by side in the pages panel (you can drag-drop the pages to make the 3 pages spread). Go to layout to make finishing touches.

Maybe you are looking for

  • Family Share Organizer, no Request to Purchase notification

    Hey guys, I have recently enabled the family sharing for my family, which includes my two daughters, and claimed myself as the organizer.  Now that the Request to Purchase feature is enabled for my daughters, my wife will receive the notification on

  • The parameter is incorrect Error when browsing by name

    I have a domain setup, When i try to browse my "servername - share" i recieve the following error "servername - share" is not accessible. you might not have permission to use this network resource. Contact the administrator of this server to find out

  • Can someone explain "copy address" in Mail?

    I have never understood why when you click on an address in an e-mail and then select "copy address" what you get is not only the address but also the name. For  instance,  "[email protected]" when you copy and paste yields "Name <[email protected]>"

  • Problem display item

    I'm populating a display item using a from a post_query trigger using the following statement. It works if there is an item. However if there is not i get the following error FRM-40735: POST-QUERY trigger raised unhandled exception ORA-0403. Can anyo

  • QuickTime chokes on audio Google Video ".avi"-eg. Pearl Jam "Life Wasted"

    QT 7.1 chokes, (Tiger w/ all updates) VLC and mPlayer both handle it fine. Suspect it is a codec incompatibility...specifically the audio which cuts in and out, in and out...., the video seems to play fine. the chunks it plays sound right...and watch