GREP question - spaces before am & pm

Hello,
I am wondering if there is a GREP which will find a number with an am or pm and add a space between the number between the am or pm?
My contributers to the magazine I typeset keep typing times in as "7pm" for example, our style says it should be "7 pm". Changing these by hand is a pain.
Thanks!!!

You don't really need the plus sign after the digit.
Interesting choice of the "or" statement, too. My first reaction was to use (\d)([ap]m) which also works, and it probalby would be a good idea to add a work boundary to make it look like (\d)([ap]m\>)
Not quite sure how to add an end of word to your "or".... Maybe (\d)(am\>|pm\>)
I wonder which method runs faster.

Similar Messages

  • Add space between set of Symbols - Grep Question

    hi everyone,
    I have another Grep question someone hopefully can help with. I need to find the following symbols in my long document < > + =      
    All these symbols need space either side of the character. I would like to setup a grep expression and have it find the symbols and add spaces either side. So far I can find each symbol but can't figure out how to add spaces before and after with the replace feature?
    find:
    =|<|>|+
    replace:
    can anyone help..
    lister

    Use this line in Find option: \+|\=|<|>
    Use this line in Replace option: <space>$0<space>
    Siva

  • 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.

  • Grep Question

    Can I specify a paragraph style in a grep query?
    I want to have a grep style that is only triggered if the paragraph before has a certain style in use. I figure if I can specify the style in a look behind this should be possible no?

    yeah.. imagine you have a space after attribute on paragraph style 1, and space before on paragraph style 3. I am looking for a way to make it so that I can avoid a double sized space when style 1 is followed by 3.

  • White spaces before and after Images

    I have several images in my FM document,
    They are either gif or jpg.
    All set in Anchored frames, left-aligned.
    I have made most of them conditional for Online help, so they
    dont show up in my Online help.
    My issue is I am not sure how to remove all the space that
    appears before and after the images (they are not displayed because
    I have set it to conditional)
    I remember somewhere that the spaces for such images can be
    removed.
    Please let me know if there is.

    Hi,
    Thanks for replying.
    I have removed the spaces before and after the images in
    Frame.
    Set the images to be conditional (only for print). If there
    are any images they are in anchored frame--left aligned.
    So my problem is that the space before - after and the place
    where the image originally was (now not displayed as it is
    conditional) have these huge white spaces displayed.
    I am not sure how to map them or how to delete them.
    I am familiar in FM, and Robohelp (although i have worked
    with Word only and it was easy). For some reason this seems too
    hard.
    Hope I have gotten across to you with my question.

  • How can I control the space before and after text in a table

    Hello
    I have a series of icons with descriptions, these are lined up with icons on the top row and description text in the bottom row. Each icon and description is divided by a stapled line.
    The text is of varying width, therefore the column width must also wary. However I would like to make the space before and after the text equal in all instances (See image).
    If there is anyone that can tell me how to do this with tables or any other tools I would be very thankful.

    The only way I can think of to maintain equla spacing between the text ov vartying lengths and the vertical lines is to put each icon/text pair in it's own frame fitted to content, make each vertical line a separate object, then select them all and distribute the spacing.

  • Space Before Text in Word Document

    Having generated a word document I noticed that thre was
    space before all my paragraphs. Simple to fix, or so I thought.
    When I checked the paragraph setting s in word there was no space
    before the paragraph. Checked the paragraph above, and that did not
    have space after set.

    If the extra spacing is not in your Word output files, then
    it must be in your RH source files.
    There's either something at each of the paragraphs, or in the
    HEAD section of the topic, or in your CSS style sheet assigned to
    the topic. The proximity of styling info to its content is what
    determines its effect.
    Good luck,
    Leon

  • Space Before/After Not Refreshing in Paragraph Palette

    Hi, I'm using Illustrator CS4 and am frustrated that in the paragraph palette, when I select text with specific settings for space before or space after, these values do not refresh to what is applied to the text. The values just remain at the last setting that I input or something. So I have no way of determining what the space before or space after is on different chunks of type. And if I try to adjust the settings up or down (using the arrows), it will jump to whatever setting is displayed (which is not what is actually applied to the type.
    - Has anyone else ever experienced this behavior?
    - Any workarounds?
    - Any other ways to detect the actual values applied to the text?
    THANKS! Very frustrating bug.

    are you selecting the text Frame? if the palette shows the last used settings it means the whole textFrame has no custom spacing applied. If you see nothing, it means mixed settings.
    you need to place the cursor inside a paragraph in order to be picked up by the palette.

  • How do I decrease the space before a footnote

    I cannot figure out how to decrease the amount of "leading" space before the footnotes begin.  The paragaraph before the footnote line has not ended, so cannot simply decrease the amount of space after that particular paragraph.  The answer must be pretty simple, I just can't find it.  Thanks.

    Hi albertof92270938,
    If you're referring to a PDF file, you can reduce its size by using Acrobat. If you don't have Acrobat, please feel free to try it out. You can download a free 30-day trial from http://www.adobe.com/products/acrobat.html.
    In Acrobat, you choose File > Save as Other > Reduced Size PDF, or File > Save as Other > Optimized PDF.
    Please let us know how it goes.
    Best,
    Sara

  • Increase / decrease the space before / after a table -

    Hi all,
    I have not found any shortcuts which, after you select a table, modify the space before or after.
    Does anyone have an idea? Otherwise, an early idea for a [JS]?
    Thank you in advance! 

    According to the instruction, I closed InDesign and re opened it then immediately hold down Ctrl+Alt+Shift, but there is no dialog window pop up. I did this a few times.
    Then I tried to do it manually by deleting InDesign Defaults and InDesign SavedData. But in the folder (Windows XP: C:\Documents and Settings\<USER>\Application Data\Adobe\InDesign\<Version #>\<language>\ ) I can see InDesign Defaults but no InDesign SavedData. I deleted InDesign Defaults anyway, re opened InDesign, nothing changed.

  • I have highlighted words in an .iba file. Now I need to increase the space before (and/or after) the paragraph it's contained in. If I increase the space after, the height of the highlighting increases also. Is there any way around this?

    I have highlighted words in an .iba file. Now I need to increase the space before (and/or after) the paragraph it's contained in. If I increase the space after, the height of the highlighting increases also. Is there any way around this?

    http://www.apple.com/feedback/kaywerty wrote:
    A rather long winded way of asking if anybody knows if it's possible to have multi-windows open
    It's not possible.
    Suggestions here -> Apple Product feedback

  • Deleting word deletes space before it as well

    I don't know if this has always been the case, but I've only just started to notice it and it is frustrating the **** out of me.
    In pages on the iphone and iPad, if I delete all the letters in the word, the space before the word automatically gets deleted as well.
    Try it.
    I just went to the apple store and it's happening on their ipads as well.
    I type for a living and cannot tell you how many thousands of times today I had to go back and correct words that had no space between them.
    Did someone really think that when I press delete once what I actually want is to delete twice?!
    So, anyone know if there's a way around this issue? I'm wondering if it came in with ios 7? Interestingly it's only pages, not happening on notes or email etc.

    For tips on how to get around it go here:
    https://discussions.apple.com/message/23253948?ac_cid=tw123456#23253948
    Either type with an X in front of where you're typing, or turn on tracking and set to "final" in settings.
    Best we have for now!

  • Bug: pressing backspace to delete a word in Pages for iOS automatically deletes space before word

    Hi guys,
    When I delete a word in Pages for iOS 7 character-by-character, the deletion automatically includes the space before the word, even if I don't initiate a keypress for that space. This is sporadic in that it consistently occurs in some sections of text (usually at the end of lines) and not in others, in paragraphs with custom Styles and in paragraphs with default Styles alike.
    If the bug happened consistently, I could probably by habit overcome this extra deletion. However, since it does not happen in every circumstance, it's unpredictable and as such very disruptive to my workflow.
    This occurs in new documents with no formatting. I've also tried Resetting All Settings, restoring the app through the Settings menu, and deleting and re-downloading the app from the App Store. It occurs both when I use my Bluetooth wireless keyboard (Logitech) and when I use the iPad Mini's OS keyboard.
    I really don't want to restore my entire iPad just to fix this problem, as I think it's an app-based bug (the problem does not happen at all in any other text app).
    This Pages version is 1.7.2, and I'm using iOS 7.0.2 on an iPad Mini WiFi only.
    Could anyone with a similar setup try this out? I can't be the only one...right?

    I am experiencing this as well. In another thread (https://discussions.apple.com/thread/5374836) it appears someone contacted support about it and was told this is expected behavior.
    For me, this will cause me to stop using Pages. It's extremely aggravating.

  • Importing XML - white spaces before tags

    Hello,
    I'm importing XML into an inDesign document. Everything imports fine but I get extra spaces whenever there is a paragraph return. How could I get rid of those extra white spaces? I don't want to go and edit out all those white spaces by hand....
    Thanks for your help.

    Hello,
    Your issue looks like the one described in this page:
    http://www.xmlplease.com/normalized
    For reference purposes, here is the link for the supported schema and wsdl in PI 7.1
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00a9a425-1769-2a10-9196-bd8eeed72e4c
    As a temporary work around, you can try editing the xsd by removing the spaces before importing it into PI.
    Hope this helps,
    Mark

  • Styles and "space before" quandry

    I will assume that most readers are familiar with PowerPoint and are aware that for your average bulleted slide master you can change the space before or after on a per-level basis without using named styles. I want to use spacing in Keynote but am seeing annoyances.
    Method 1) If I use all the same style name as in the default themes, then I end up with that asterisk after all but one style, because there is only one unmodified "Body" style and the rest are considered overrides.
    Method 2) If I use different styles, I have to reach for the mouse more.
    Am I missing a technique to effect this, without overrides and with (I assume) using only one style?

    Thanks but that's not what I meant. I can use the spacing just fine. The issue is with the outcome of the two methods. #1 introduces overrides (and, by the way, reassigning or clearing them does not always work), and #2 requires an assignment to many paragraphs.

Maybe you are looking for

  • IMovie HD (6) will not capture video taken from HV20 in PF24 mode

    The preview window shows the video just fine. iMovie complains that Quicktime doesn't have the ability (codec/plugin) to edit or playback my video. I find it ironic that software claiming to support HD and HDV can't read the video. It says to re-inst

  • Braindead almost-senior can

    I have signed up for iCloud, and I have Notes, Reminders, Pages, and iCal shared, accessible through those apps,  on my iPad, iPhone, and MacBook. BUT...when I go to icloud.com, it acts like I don't have an account yet. How can I get to iCloud?

  • Making a form with a non printing background

    I need to make a form for an overprint on a 4-up postcard sheet. The postcard is preprinted, but I want to show it in the PDF form so that the user knows where the data is going to be when they print out the form. So basically I need everything but t

  • Select query for 6 different tables with vbeln as same selction criteria

    Hi, I have a query.. I am using 6 differnet tables with vbeln being the same primary key on the basis of which i have to match the data. I have assign vbeln with different name but in the select query it gives me the error that vbeln2 is not the corr

  • HP6830 not recognized in HP Solution Center

    I have a HP6500 E709n wirelessly connected to XP/VISTS/W7 systems and it appears in the HP Solution Center. I just installed a HP6830 and it is wirelessly connected as well to the XP/VISTA/W7 systems and I am able to print to the HP6830 from those sy