Trying to use GREP to add 2 spaces to the beginning of a line, under a particular circumstance.

Hello,
I am trying to add 2 blank spaces to the beginning of any line that has a punctuation at the end of that line, followed by a forced line break.
I can get the GREP to find the punctuation at the end of a line with a forced line break:
[[:punct:]](?=\r)
But, is there a way to tell it to now add 2 spaces to the beginning of that line?
Any guidence is greatly appreciated.
thanks
babs

If applying a paragraph style works (nice thought!), then finding [[:punct:]]\n and applying the style works fine, no need for the grouping and the lookbehind. But if it's really the case that two spaces need to be inserted, then that's possible only if the text is not formatted at all. Then
find ^.+[[:punct:]]\n
change to \x20\x20$0
will do the trick (\x20 is the space character). If the text does have any formatting, a script is needed.
Peter

Similar Messages

  • Indesign adds an anoying space at the beginning of a line

    Text supplied to me very very often has the combination:
    <tab><bullet><tab>rest of text....
    If I select <tab><bullet><tab> and hit delete, Indesign replaces it with a space.
    It's very annoying because I then have to delete the space. Who needs a space at the beginning of a line like that!?
    Preferences > Autocorrect > [  ] Enable Autocorrect is OFF, so there's no substitution going on (I think).
    Can someone offer any insight as to what I need to adjust in my prefs to stop this behaviour.
    I'm using Mac OS 10.9 and Indesign 2014
    Many thanks,
    K.

    Theway  I choose to to fix this kind of problem is to Use Find and Replace. Under Find, insert the text or code that you want deleted. Under Replace, insert NOTHING, then select Change All. If you don'twant to replace all instances use the Find Next to keep the coding or use the Change/Find that will delete the code and find the next instance. I use this method all the time to get rid of the double-spaces that are frequently found in word processing files. You can probably do the same thing in your word processing program.
    It may sound complicated but it's really quite easy.

  • I just ordered a macbook air today and need to know if the 128gb SSD is enough space. I presently have a macbook pro and am using only 30gb hard drive space so, the apple rep said 128 is enough as I do not load much pictures or gaming etc. Also is i5 ok.

    I just ordered a macbook air today and need to know if the 128gb SSD is enough space. I presently have a macbook pro and am using only 30gb hard drive space so, the apple rep said 128 is enough as I do not load much pictures or gaming etc. Also is i5 ok.

    Id choose the I5 yes, depends on what your usage is going to be,
    ....your question about "128 gig being enough" begs the question for IDEALIZED USE of your macbook AIr
    In the case of a Macbook Air with ‘limited’ storage on the SSD, this distinction becomes more important in that in an ever rapidly increasing file-size world, you keep vital large media files, pics, video, PDF collections, music off your SSD and archived on external storage, for sake of the necessary room for your system to have free space to operate, store future applications and general workspace.  You should never be put in the position of considering “deleting things” on your macbook SSD in order to ‘make space’.
    *Generally, unless you NEED the data at least once every few weeks or once a month,...it really does'nt NEED to be on the SSD of your Macbook Air.
    Professionals who create and import very large amounts of data have almost no change in the available space on their computers internal HD because they are constantly archiving data to arrays of external or networked HD.
    Or in the case of the consumer this means you keep folders for large imported or created data and you ritually offload and archive this data for safekeeping, not only to safeguard the data in case your macbook has a HD crash, or gets stolen, but importantly in keeping the ‘breathing room’ open for your computer to operate, expand, create files, add applications, for your APPS to create temp files, and for general operation.
    Ive got more APPS than any human should have on my 128gig AIR,..(50 or so),....and 10gig of working data, important files etc etc.
    Still have 82gig available....... the entire point is that someone shouldnt consider the Air a "storage device" for tons of pics, music, vids, etc.
    *Never consider any computer a data storage device at any time under any circumstance, rather a data creation, sending, and manipulation device. Anyone who thinks data is safe on any computer, even copied upon multiple partitions is making a mistake that will, without fail, strike.
    For needs of packing around a LOT of "big data" with your Air in its case..., get a nice 1TB HD for $70, or even a 2TB drive not much bigger.
    Perfect 2TB HD, very slim, the "little giant"   made by Toshiba (have several of these) $119
    http://www.amazon.com/Toshiba-Canvio-Connect-Portable-HDTC720XK3C1/dp/B00CGUMS48 /ref=sr_1_4?s=electronics&ie=UTF8&qid=1379182740&sr=1-4&keywords=2tb+toshiba
    *This one is the BEST  external HD available that money can buy:
    $75
    HGST Touro Mobile 1TB USB 3.0 External Hard Drive
    http://www.amazon.com/HGST-Touro-Mobile-External-HTOLMX3NA10001ABB/dp/B0062FZ2WS /ref=sr_1_1?s=electronics&ie=UTF8&qid=1379185002&sr=1-1&keywords=hitachi+extern a l+hard+drive

  • TS1292 Purchased gift cards about a year ago. Misplaced two of them. Found them yesterday, tried to use one today. Invalid. If the money is tagged to the card code why is it invalid? Now have to take photos of both sides and find receipt? Guess out $20?

    Purchased gift cards about a year ago. Misplaced two of them, but Found them yesterday. i tried to use one today. Invalid. If the money is tagged to the card code why is it invalid? Now have to take photos of both sides and find receipt? Finding the receipt might take as long as .finding the cards. If I paid hard earned money for the card from a computer company why would that card not be in their data base waiting to be activated? I guess I am out $20 to Apple for not activating immediately! My account was hacked once so I won't put a credit card in and live with gift cards. Now I am getting hit for $20, two gift cards for ten each. I now question who and how people are making money?? Is my only solution, buy card, redeem code instantly, purchase item?

    Hi Oxfordataloss,
    Thanks for posting. I'm really sorry you've had such problems with BT, it's certainly not the kind of service we would hope to provide. I'll take your comments on board and if you don't receive the final bill as expected please drop me an email with the account details and a link to this thread for reference.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Cannot use delete key or back space on the keybord in Sun Java St. Creator!

    Happy new year Java fans!
    I have a small problem but annoing me a lot!!
    Cannot use delete key or back space on the keybord in Sun Java St. Creator! It is ok outside the creator!!
    I am using solaris 10 on x86 machine.
    Thanks for help

    Similar issues have been filed against netbeans and mostly they seem to happen when the keybindings have been modified:
    - http://www.netbeans.org/issues/show_bug.cgi?id=68151
    This is a bug in new Options dialog. To make it work, just delete the wrongly
    defined shortcuts in xmls in ~/.netbeans/dev/config.
    - http://www.netbeans.org/issues/show_bug.cgi?id=67351
    btw, can you run creator with a different userdir (by renaming the existing userdir) and see if the problem still persists? If it does not, then it would mean there is some keybinding setting in the current user directory that is causing this problem.

  • When trying to use flash player it says to download the player. i have the latest player

    when trying to use flash player it says to download the player. i have the latest player

    I can assume that you're using IE11, and probably with Windows 8.1.
    This is a known problem with Internet Explorer 11, which Microsoft has been aware of since October 18 when they released their latest "untested" browser. The pages can't recognize the browser, so they don't recognize any of the plugins, like Flash Player. So far, Microsoft has made NO indication that they have any plan to fix it soon.
    Microsoft's recommendation is to use Compatibility View for affected pages, and "pretend" you're using an different browser. Trouble with that is it has seen limited success at best, and you have to individually enable it for EVERY page that has problems.
    I'm not big on "pretending" so I recommend actually using another browser.
    Firefox (from Mozilla)
    Opera (from Opera)
    Safari (from Apple)
    Chrome (from Google)
    ANY of those will work where IE11 won't, with the Flash Player Plug-in (For all other browsers), and Chrome doesn't even need that because it has its own Flash Player plugin built in.

  • How to insert a black space at the beginning of a timeline

    Hi guys,
    Sorry for the stupid question....I only bought FCPX yesterday.
    I have figured out how to drop an audio file into the timeline and add some title effects to the beginning. But now i want to add a black space at the beginning.
    Is there an easy way to do this that I have simply missed - I have spent several hours trying to find a way to do it... 
    Thanks in advance for your help  
    Best regards,
    Craig

    Thanks everyone for the help - really appreciate it !!
    I didn't know that there could only be one "correct" answer - so sorry to Tom if I have done this incorrectly. I was too excited that both answers worked for me that I didn't really concentrate hard enough on whose idea it was - I thought I could mark them both as correct.
    Next time I will take more time for a considred response.
    Thanks again everyone - you really helped me out.
    Cheers,
    Craig

  • Space at the beginning of a row in a listbox?

    i want to add rows in that way, that it look like a tree hierachy, but the listbox always remove the spaces at the beginning! what can i do?
    If i use the selectOneListbox from HTML i only can set the value that should be printed, but i can't set a return value if the row is selected, is that right?
    best regards

    ok, here is the outcome:
    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta content="no-cache" http-equiv="Pragma" />
    <meta content="no-cache" http-equiv="Cache-Control" />
    <meta content="no-store" http-equiv="Cache-Control" />
    <meta content="max-age=0" http-equiv="Cache-Control" />
    <meta content="1" http-equiv="Expires" />
    <title></title>
    <script type="text/javascript" src="/EdithsAddRemoveList/theme/com/sun/rave/web/ui/defaulttheme/javascript/formElements.js"></script>
    <link rel="stylesheet" type="text/css" href="/EdithsAddRemoveList/theme/com/sun/rave/web/ui/defaulttheme/css/css_master.css" />
    <script type="text/javascript">
    var sjwuic_ScrollCookie = new sjwuic_ScrollCookie('/Page1.jsp', '/EdithsAddRemoveList/faces/Page1.jsp');
    </script>
    <link id="link1" rel="stylesheet" type="text/css" href="/EdithsAddRemoveList/resources/stylesheet.css" />
    </head>
    <body id="body1" style="-rave-layout: grid">
    <form id="myForm" class="form" method="post" action="/EdithsAddRemoveList/faces/Page1.jsp;jsessionid=6F2D961C364A5579FCC4A691FA389D5A" enctype="application/x-www-form-urlencoded">
    <select style="height: 168px; left: 96px; top: 72px; position: absolute; width: 96px;font-family:monospace; white-space:pre" class="Lst" id="myForm:listbox1" name="myForm:listbox1" size="12" onchange="listbox_changed('myForm:listbox1');  return false;">
         <option class="LstOpt" value="8">ADAT</option>
         <option class="LstOpt" value="9">  3. Klasse</option>
         <option class="LstOpt" value="10">  4. Klasse</option>
         <option class="LstOpt" value="14">  5. Klasse</option>
         <option class="LstOpt" value="11">Englisch</option>
         <option class="LstOpt" value="12">  1. Klasse</option>
         <option class="LstOpt" value="13">  3. Klasse</option>
    </select>
    <input id="myForm:button1" name="myForm:button1" class="Btn2" onblur="return this.myonblur();" onfocus="return this.myonfocus();" onmouseout="return this.myonmouseout();" onmouseover="return this.myonmouseover();" style="position: absolute; left: 264px; top: 168px; width: 72px; height: 48px" type="submit" value="Button"></input><script type="text/javascript">sjwuic_assign_button('myForm:button1', defaultButtonStrings, true, false, false);</script>
    <input id="myForm_hidden" name="myForm_hidden" value="myForm_hidden" type="hidden" />
    <input type="hidden" name="com.sun.faces.VIEW" id="com.sun.faces.VIEW" value="_id1:_id2" />
    </form>
    </html>

  • HT4623 iPhone 4s will not boot after trying to install ios7 beta 4. Stops at apple logo with progress line under it. how can I reset it or get it back up to do a restore then try the iOS 7 beta 4 install again. Issue was probably caused by disconnection

    iPhone 4s will not boot after trying to install ios7 beta 4. Stops at apple logo with progress line under it. how can I reset it or get it back up to do a restore then try the iOS 7 beta 4 install again. Issue was probably caused by disconnection

    Obviously since you have iOS 7 you're a developer.  As a developer, you signed a NDA with Apple not to discuss the iOS on a public forum.  Please log in to the Developer Forum using your credentials and ask for help there, lest you risk having your credentials terminated.
    Thanks, and best of luck to you.
    GDG

  • I just got iTunes 11.0. I'm used to being able to return to the beginning of a song by hitting 'enter'. What's the new command for skipping to the head of a song?

    I just got iTunes 11.0. From all the previous versions I'm used to being able to return to the beginning of a song by hitting 'enter'. What's the new command for skipping to the head of a song?

    Mmmmmm. Works OK for me. I've tried every variation I can think of. Play from playlist, play from library, shuffle on, shuffle off, single song repeat on/off, playlist repeat on/off.
    WAIT !!   Now I've found it  !!  It happens when I have the sidebar hidden and play a playlist from the PLAYLIST pane. Hitting Enter then takes me to the FIRST song in the playlist.
    WAIT AGAIN !!! In the time it took to write the above, it changed again and works properly. Well properly is not really true. It works if I stay in the PLAYLIST pane. If I switch to the SONGS, ALBUMS or ARTISTS pane, enter does nothing. BUT, if I switch to the GENRES pane, enter starts the first song there. AND, if I've switched away from the PLAYLIST pane and switch back, enter then starts the first song in the playlist.
    WOW !! That was a crazy ride. I think we can safely say that there is something awry.

  • I tried to install the new iOs 7 on my iphone5 and itunes shut down before it completed and now my phone is stuck on with the apple and a line under it.

    I tried to install the new iOs 7 on my iphone5 and itunes shut down before it completed and now my phone is stuck on with the apple and a line under it.

    Hello roch23
    Check out the article below to get you back up in running.
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • How do I delete the blank space at the beginning or end of a project?

    I constantly end up with blank space at the beginning or end of a project - how do I remove it?  I get this ALL the time and I jsut can't get rid of it.  Obviously I want my project to start at 0.00 not at 1.xx.
    Thanks.

    That's not a project. You're inside an multicam angle editor. You need to edit the multicam clip into a project. That's where you edit it.

  • Trying to Use GREP To Identify Beginning of a Paragraph

    I want to apply a character style to the first sentence in a paragraph. The challenge is these are not always traditional sentences. They can begin with a decimal point or a number. Here are a few examples.
    7.25” diamond accent bracelet. In sterling silver. Reg. $340
    Would want the character style only applied to "7.25” diamond accent bracelet."
    .04 ct. tw. diamond bangle bracelet by Brilliance. In sterling silver. Reg. $720
    Would want the character style only applied to "04 ct. tw. diamond bangle bracelet by Brilliance."
    Diamond accent earrings. In sterling silver. Reg. $120
    Would want the character style only applied to "Diamond accent earrings."
    I've used [\l\u\d\.], but that applies the character style to too much of the text. I've added the ^ to the beginning of the code, but that did not accomplish what I am trying to do, either.
    Thanks in advance for any ideas on this.

    actualy it means find any sequence of characters (.), repeated as many times as posible, but at least one (+?),  that starts at the begining of the paragraph (^), folowed by a dot (\.). the second part is called a positive lookahead, and it means that the expresion you are looking for (^.+?\u) is valid only if the conditon in the lookahead is true: (?= means 'begin positive lookahead', \s\u is the expression to validate (any whitespace followed by a capital letter), and the end of the lookahed )
    Sometimes, to understand regular expressions it is easyer to read them from right to left.
    Some very common and usefull expresion 'parts':
    .+? or .*? -> find the longest seqence of characters;
    .+ or .* -> find the shortest one;
    this is the tutorial i'we used to learn regular expresions:
    http://www.regular-expressions.info/tutorial.html

  • How do I add a space to the toolbar in Firefox 29.0? I can grab a space from empty areas and move it around, but where do I find a "space" icon to ADD a space?

    It has been useful in past versions of Firefox to be able to add (a) space(s) between icons on the toolbar in order to create groups of icons and/or separate icons by class or function. In Firefox 29.0, I discovered how to "grab" (click and drag) a space from open areas on the toolbar and move it to another part of the toolbar. But how can I add spaces to the toolbar? In past versions, there used to be a space icon in the customize menu set that could be dragged to the toolbar for that purpose.

    You can get around this problem by installing the "Classic Theme Restorer Add-on" available at: https://support.mozilla.org/en-US/kb/how-to-make-new-firefox-look-like-old-firefox
    While returning the squared-off look to your tabs, instead of the newer, rounded version - it also gives returns the option to add spaces; variable size spaces, and separators to your tool-bars.

  • Is it possible to add a word at the end of a line?

    Hi, i'm searching a way to automatically add a word at the end of a certain paragraph styles?
    is it something possible doing by using a script?
    i don't script myself but if someone could find me a way to do this it would be really appreciated.
    Here's an example to what i need to do:
    i have paragraph style X in a current  book document, and i need to edit the book and add the copyright source at the end of every line that has the style X to it
    so i would need something that asks me
    the targeted paragraph style
    which word i want to append to it, and then apply it torough the document.
    Thanks in advance

    Yes, the screen shot shows where you got it wrong:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    Find: (.)$
    and set your paragraph style in the find format area
    Change: $1XYZ
    where XYZ is the text you want to insert.
    .. you forgot the '1' right after the '$'. It's an important omission: "$1" is a GREP code, meaning "insert the found text, parenthesized group #1" -- and there is also a "$2", "$3", etc. up to "$9". It's great if you have to switch two, or even more, items around! But without the digit, the dollar sign indicates ... just a dollar sign.
    Change the Change to text to
    $1~S(CEMEQ)
    and you'll be fine.

Maybe you are looking for

  • Video blank in PS CS6

    Importing mp4 video (out of a GoPro) into Photoshop CS6. It used to work perfectly a few mths ago. I always keep my S/W up-to-date. Now (after various updates) I only get the sound track opened correctly in PS (which seems perfect) but the video is b

  • Is there any way to pass Mail.app rules to Outlook?

    Hello, I want to use the same rules i use in Mail app from OS X in Outlook. Can you help me find the way to do it, because I have tons of rules and don't want to copy them one by one.

  • UK pricing of Adobe Software a rip off compared to US... Why?

    I'm an existing Adobe customer and own Lightroom 2 which I upgraded to Version 3 and Photoshop CS4 Extended which I want to update to CS5 Extended. I was on Adobe.com (via the help button in Photoshop) and noticed on the right of the page upgrade to

  • Apache2, PHP, MySQL Help

    Hi, Sorry if this is a bit of a newbie thing todo but I am not too good with solaris configuration yet. Can anyone supply a decent step by step and easy tutorial/how-to on how to set up Apache, PHP, MySQL and PHPmyadmin on a SPARC solaris 10 box plea

  • Update DIM data in Fact Table

    All - I have a TSR dimension data (1 of 12 dimensional attributes) in our forecast fact table which gets updated monthly in our source system and we have to reflect this in our BPC system. What is the best method of updating this data in BPC? 1. Can