GREP question, hard return&tab after lines ending in (, space)

I have a problem that I have been banging my head against the wall for hours trying to figure. I have pages and pages of remote codes I need to format in a specific way. This specific way causes a problem that creates the right side of my columns to look haggard with spots of comma spaces, example:
Abex                 5011, 5286
Accurian            5140, 5452
Accuscan          5005, 5014
Admiral              5003, 5004,
       5005, 5014, 5015, 5018,
       5025, 5035, 5040, 5041,
       5055, 5165, 5308, 5455
I hope that comes out looking like I mean it
There is a picture if it helps. Anyhow. I need it to look like this:
I hope this helps. The thing is I have figured this out before and I forgot to save the style. I thought I did. I didn't. Sucks. But I did make it so that on lines ending with a comma and space it would hard return and tab.
Please please help. This has my mind numb trying to figure it out and I have pages and pages of these codes to work through.

@ GrantH
That is an easy fix, which I would easily do, but it doesn't resolve the issue that the lines should not end in commas.
@Jongware
None taken. I have done something like this before. I know I have because the second picture I included is from a manual I have done before that shows it as such. Granted... that was a while ago and I may be mistaken on the text given for input. However, I'm "pretty" sure I remember having the same issue with the commas at the end and resolving it.
@Hakkenlid
This pretty much works for me with the exception of a few trouble spots where the Find just seems to skip over perfectly good matches. So far, this gives me a lot more help than where I was at though.
@Hakkenlid
This is what we are going with. It keeps the most readability and completely resolves my comma issue. Saved the expression for later. I really appreciate your help. My Friday started off to a much better start that I was looking forward to.

Similar Messages

  • Pressing enter (hard return) moves next line to next pg/frame/col

    Hi,
    I read this was a glitch in German and Swedish CS5 Mac version.
    Options seem to be set correctly.
    Thanks

    Do you have the German or Swedish version? Have you updated to 7.0.3?
    This is actually also a fairly common problem on some Windows laptops where the BIOS maps the two enter keys together. Toggling NumLock switches the behavior between a column break and a paragraph break. I'm not sure if affects Macs without numberpads, but I think not.

  • File Problem (getting line ends with \r\n)

    I used readLine method     to read the line. It returns string.
    I want to get the lined that ends with 0D0A ( \r \n ).
    In the file in between there are many 0D. So my while loop
    returns all the lines ends with 0D. But I need only the lines ending with 0D0A.
    How can I differntiate these two types of lines
    .....0D
    ...........0D0A
    Is there any method in Java to differentiate these two lines.
    reading char by char is time consuming process and it produce some overhead.
    I think reading line by line gives the better solution
    here is the code
    import java.io.*;
    class checkAcc {
    public static void main(String as[]) {
    try {
    BufferedReader bf = new BufferedReader(new InputStreamReader(new FileInputStream("exa.dat")));
    String s = null;
    byte[] b;
    while((s = bf.readLine()) != null) {
    System.out.println("From Dat File ===> " + s);
    } catch(IOException ie) {
    System.out.println(ie);
    Can any one pls give me the idea ...

    That's the nature of readLine() my friend. The definition is as such:
    Read a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.
    There isn't anything wrong (performance wise) with using read() and processing it character-by-character.
    tajenkins

  • Enter key not producing hard returns

    Suddenly, my enter key is producing soft returns instead of hard returns. After trying to fix it for hours, I found out that hard returns are produced only with the alt+enter keys. Somehow they are reversed. What can I do?

    To enable the enter key one uses shift+return and that gives you a soft return. If you want a hard return just press the return key.

  • Working with line feed, carriege return, tab etc in JSP web layout

    Hi guys,
    After looking at an old thread
    line feed, carriege return, tab etc in JSP web layout
    I think I am experiencing the same problem here and I'm struggling to implement the solution, mainly because I am a complete newbie at jsp reports (and most things webby).
    1) Can I add the code following code directly to the web source? If not then how do I find the css file being used?
    table pre {
    overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
    /* width: 99%; */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
    2) I'm not sure how to set the width to be same as the width of the table cell.
    Here's the web source and thanks very much in advance!
    <%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
    <%@ page language="java" import="java.io.*" errorPage="/rwerror.jsp" session="false" %>
    <%@ page contentType="text/html;charset=ISO-8859-1" %>
    <!--
    -- Version control data:
    -- $Revision: $
    -- $Date: $
    -->
    <!--
    <rw:report id="report" parameters="userid=xxx/xxx@xxx">
    <rw:objects id="objects">
    </rw:objects>
    -->
    <html>
    <head>
    <meta name="GENERATOR" content="Oracle 9i Reports Developer"/>
    <title> STAR Solution Plan Report </title>
    </head>
    <body>
    <!-- Data Area Generated by Reports Developer -->
    <rw:dataArea id="MG2GRPFR69">
    <rw:foreach id="RG2691" src="G_issue_solution">
    <!-- Start GetGroupHeader/n --> <table>
    <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" style="font-family: Book Antiqua; font-size: 10pt">
    <TBODY>
    <TR>
    <TD vAlign=center align="left">
    <p><IMG src="http://witton3/star/Docs/EU_Man/TIMET_Logo.jpg" width="150" height="77"><br>
    </p>
    </TD>
    <TD vAlign=center align="right">
    <p><IMG src="http://witton3/star/Docs/EU_Man/Star_Logo.gif" width="116" height="46">
    </p>
    </TD>
    </TR></TBODY></TABLE>
    <p align=center style='margin-right:.5in;margin-left:.5in;text-align:center'><span
    style='font-size:18.0pt;font-family:"Book Antiqua"'>STAR System Documentation</span></p>
    <p align=center style='margin-right:.5in;margin-left:.5in;text-align:center'>
    <u><b><span
    style='font-size:13.5pt;font-family:"Book Antiqua"'>Solution Plan for STCR </span><font size="4"><span style="font-family: Book Antiqua">
    <rw:field id="F_issue_id" src="issue_id" breakLevel="RG2691" breakValue=" "> F_issue_id </rw:field>
    </span></b></u></font></p>
    <P>NOTE: <font color="#008000">For existing STAR programs, unless explicitly
    stated in the solution plan, functionality pre-existing in the program or report
    will be retained. Approval of the solution  plan implies agreement that
    current functionality not being modified is still acceptable going forward, in
    the light of the specific changes documented. </font></P>
    <b><u><p>Root Cause of Issue</b></u></p>
    <p> <rw:field id="F_root_cause" src="root_cause" breakLevel="RG2691" breakValue=" "> F_root_cause </rw:field>
    </p>
    <b><u><p>Overview of Solution</b></u></p>
    <p> <rw:field id="F_solution_overview" src="solution_overview" breakLevel="RG2691" breakValue=" "> F_solution_overview </rw:field>
    </p>
    <b><u><p>Functionality Changes</b></u></p>
    <b><p>After implementation of these changes the users will now be able to:</b></p>
    <p> <rw:field id="F_sp_new_functionality" src="sp_new_functionality" breakLevel="RG2691" breakValue=" "> F_sp_new_functionality </rw:field>
    </p>
    <b><p>After implementation of these changes the users will no longer be able to:</b></p>
    <p> <rw:field id="F_sp_removed_functionality" src="sp_removed_functionality" breakLevel="RG2691" breakValue=" "> F_sp_removed_functionality </rw:field>
    </p>
    <b><p>After implementation of these changes the users will need to do this differently:</b></p>
    <p> <rw:field id="F_sp_changed_functionality" src="sp_changed_functionality" breakLevel="RG2691" breakValue=" "> F_sp_changed_functionality </rw:field>
    </p>
    <b><u><p>Program Units Affected</b></u></p>
    <!-- End GetGroupHeader/n --> <tr>
    <td valign="top">
    <table summary="STAR System Documentation" border="1" width="100%" style="font-family: Book Antiqua; font-size: 10pt">
    <!-- Header -->
    <thead>
    <tr>
    <th width="100" align="left" <rw:id id="HBprgunittype69" asArray="no"/>> <b><font face="Book Antiqua">Program <br>Unit Type </font></b></th>
    <th width="200" align="left" <rw:id id="HBprgunitname69" asArray="no"/>> <b><font face="Book Antiqua">Program Unit Name </font></b></th>
    <th align="left" <rw:id id="HBdescofchange69" asArray="no"/>> <b><font face="Book Antiqua">Description of Change </font></b></th>
    <th align="left" <rw:id id="HBtechnotes69" asArray="no"/>> <b><font face="Book Antiqua">Technical Notes </font></b></th>
    </tr>
    </thead>
    <!-- Body -->
    <tbody>
    <rw:foreach id="RG1691" src="G_issue_prg_units">
    <tr>
    <td width="100" align="left" valign="top" <rw:headers id="HFprgunittype69" src="HBprgunittype69"/>> <font face="Book Antiqua" size="2"><rw:field id="Fprgunittype69" src="program_unit_type" nullValue=" "> F_prgunittype </rw:field></font></td>
    <td width="200" align="left" valign="top" <rw:headers id="HFprgunitname69" src="HBprgunitname69"/>> <font face="Book Antiqua" size="2"><rw:field id="Fprgunitname69" src="program_unit_name" nullValue=" "> F_prgunitname </rw:field></font></td>
    <td <rw:headers id="HFdescofchange69" src="HBdescofchange69"/>> <font face="Book Antiqua" size="2"><rw:field id="Fdescofchange69" src="sp_description_of_change" nullValue=" "> F_descofchange </rw:field></font></td>
    <td <rw:headers id="HFtechnotes69" src="HBtechnotes69"/>> <font face="Book Antiqua" size="2"><rw:field id="Ftechnotes69" src="sp_technical_notes" nullValue=" "> F_technotes </rw:field></font></td>
    </tr>
    </rw:foreach>
    </tbody>
    </table>
    </td>
    </tr>
    <b><u><p>Security</b></u></p>
    <p> <rw:field id="F_sp_security" src="sp_security" breakLevel="RG2691" breakValue=" "> F_sp_security </rw:field>
    </p>
    <b><u><p>Site Specific data /processing</b></u></p>
    <p> <rw:field id="F_sp_site_specific_info" src="sp_site_specific_info" breakLevel="RG2691" breakValue=" "> F_sp_site_specific_info </rw:field>
    </p>
    <b><u><p>Impacts and restrictions</b></u></p>
    <p> <rw:field id="F_sp_impacts_and_restrictions" src="sp_impacts_and_restrictions" breakLevel="RG2691" breakValue=" "> F_sp_impacts_and_restrictions </rw:field>
    </p>
    <b><u><p>Pre-Implementation data modifications</b></u></p>
    <p> <rw:field id="F_sp_pre_imp_data_mods" src="sp_pre_imp_data_mods" breakLevel="RG2691" breakValue=" "> F_sp_pre_imp_data_mods </rw:field>
    </p>
    <b><u><p>Post Implementation user actions</b></u></p>
    <p> <rw:field id="F_sp_post_imp_data_mods" src="sp_post_imp_data_mods" breakLevel="RG2691" breakValue=" "> F_sp_post_imp_data_mods </rw:field>
    </p>
    </table>
    </rw:foreach>
    </rw:dataArea> <!-- id="MG2GRPFR69" -->
    <!-- End of Data Area Generated by Reports Developer -->
    </body>
    </html>
    <!--
    </rw:report>
    -->

    The solution in the original post was:
    set the
    width to be same as the width of the table cell
    add following class to css file
    table pre {
    overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
    /* width: 99%; */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
    But I dont have a css file ... can I just add this to the web source and if so where?

  • Is it possible to export to PDF without a Return character at the end of every line?

    I am the author of a book whose first edition has been typeset and extensively amended in InDesign.  I now need to rewrite the first edition to produce a second edition.
    When I copy-and-paste from the PDF with which the publisher has supplied me into MS Word, I get a Return character at the end of every line, which means that text doesn’t automatically wrap and sentences are fragmented so that I get spurious grammar errors.
    I know that not all PDF files have a Return at the end of every line.  Is it possible to restrict Returns to the end of paragraphs when exporting from InDesign to PDF?  If so, what should the publisher be asking the typesetter to do?

    Thanks for your lightning-swift and helpful replies, Mike & Ellis.
    I don't have InDesign myself, so I know hardly anything about how it's used.  I'm just trying to research what an internationally-known publisher should already know how to do, but apparently doesn't!
    Following your suggestion, Mike, I have downloaded the trial version of Acrobat and exported the PDF to a Word file.  This has been moderately successful as there are far fewer spurious Return characters, just a few that I suspect may be hangovers from the typesetter having introduced soft returns in ID.
    As you've suggested Peter and Ellis, I'll suggest that the publisher asks the typesettter to export from ID to RTF and Text to see if that's even better.
    Message was edited 15:24 GMT by: AlanS5100

  • Since changing over to Mountain Lion I discover that I am no longer able to adjust spaces between lines. If I choose spacing of 1.3 after two lines single-spaced, the entire previous lines end up with 1.3 spacing. What am I missing?

    Since changing over to Mountain Lion I discover that I am no longer able to adjust spaces between lines. If I choose spacing of 1.3 after two lines single-spaced, the entire previous lines end up with 1.3 spacing. What am I missing?

    Do those previous lines have a Return/Linefeed after them, or are they just wrapped to a new line?
    What App is it you're using?

  • Return statement at the end of try or after catch blocks

    Hi
    Can anyone tell me which is the better practice - to put the return statement at the end of try block or after all the catch blocks ie at the end of method.
    Eg
    Method A()
    String str;
    try{
    str= [some code]
    return str
    catch(Exception e)
    System.out.println("Exception");
    } // end of method
    OR
    Method B()
    String str;
    try{
    str= [some code]
    }catch(Exception e)
    System.out.println("Exception");
    return str
    } // end of method

    I always try to work with only one exit point for each method.
    For readability I always put the return statement as close to the end of the method as possible.
    In this particular question,
    I think you should put the return at the end of the method (for readability, since this is what you are
    familiar with), but when I have a try-catch clause, I usually have an unrecoverable error and
    should throw this further down the tree, so it usually becomes
    try{
       return   
    }catch(...){
       // write out some logging information
       rethrow exception or throw another exception
    }I think you should NEVER reflect the occurence of an error in the return-value of the
    method when an unrecoverable exception occurs. Just rethrow this exception or throw another method.
    Other methods look like
       Object result = new...
       return result;As for the specific case of a repetitive if-case:
    This is possible in two versions:
    With one return and a result-object
    Object result = new ...
    if(..)
       result = ...
    else if(..)
       result = ...
    return result;With every time a return
    if(...)
       return ...;
    else if(...)
       return ...;For me the above two possibilities make no difference,
    but I find the second version (which I hated when I began programming)
    to be somewhat more of a (self-made) standard nowadays.
    But I do not think this particular case makes much of a difference.
    kind regards,

  • Published site has "Â"s after each hard return.

    I finally got my site to publish (not on imac), but after each hard return, and in some unexplained places, there are "Â"s and, periodically, another funky rounded "E" symbol. I tried to change the font to see if that helped, but it didn't make a difference. Any ideas?

    That "test" is just to determine what causes the problem and in this case it looks like the server setting. It's not so much that it's "wrong" but, being a school, maybe it's just set up in the "old" way. Again according to the page:
    "iWeb pages are in UTF-8 encoding so that they can accomodate all languages, not just English and those of W. Europe"
    So, now that we know that the server is forcing everyone to view using Latin encoding instead of Unicode, you can either have them change it (and, again there may be a good chance they won't understand the request, but give it a try) OR change it yourself IF you have an .htaccess (or .charset) file.
    At the bottom of the page, it mentions that if these aren't available to you, then you can open your .html pages with TextEdit (set to Latin) and manually remove those characters OR open your pages one at a time with Text Edit set to UTF-8 encoding, then do Save As and choose the Western Latin ISO.
    If you can get your OIT guys to set this up FOR you, it will make a lot less work for you. If you can't, then it's not the end of the world, you'll just have to re-save all your docs (before uploading) so that their server won't display the problem characters.

  • How do I change the spacing before or after a hard return in Pages 5.5.2?    I am working on an academic article and need to specify paragraph formatting (OS X Yosemite 10.10.2)

    How do I change the spacing before or after a hard return in Pages 5.5.2?    I am working on an academic article and need to specify paragraph formatting (OS X Yosemite 10.10.2)

    Hi Michele,
    Select the paragraphs where you want to change the spacing.
    Format Panel > Text > Spacing
    You can change 1.0 - Single to something else, or type a number in Before or After.
    Regards,
    Ian.

  • Need Order Reference Number in Sales Order Lines- Returns Tab

    Hi All,
    From which table i can get sales order reference number in salesorder->lines->returns.
    I have checked in oe_order-lines_all tables...I need to get total information for sales order like Reference type, order number, line number all those details...This information will be stored in DFF.
    Please help!!
    Thanks!!

    Hi Sanjay,
    I have checked the DFF 'Additional Line Return Information' and it contains two columns 'Return Attribute1' and 'Return Attribute2' which are storing header id of the reference item and line id respectively of a perticular sales order.
    In the sales order form on lines-->returns tab there are 3 attributes are enabled in the DFF 1) Reference Type 2) Sales Order/PO/Invoice etc.. 3) Line Number.
    Any ways i got 2 attributes ie.. Refernce Type and Sales Order/PO/Invoice Number from the DFF. Now, i am unable to findout LineNumber...Can you pls help to get this..
    Thanks!!

  • How to remove a hard return

    What is the command for removing a hard return? I want to know how to remove a hard return in a document or an email (I’ve tried both Word and my email). I'm new to Mac but on my PC I usually just put the cursor to the right of the last letter on the line and hit delete and the line below gets moved up but in the MAC when I do that all it does is delete the letters in the word to the left of the cursor.
    Thanks.

    After playing with this idea it looks like the solution is to put the cursor in front of the first word on the line you want to move to the line above it and then hit delete. Just hitting enter/return adds another hard return.
    Thanks!

  • Compound trigger returns too many lines

    Hi all.
    I have created a compound trigger which executes a procedure. Although the trigger now runs (I was getting a mutating table error before), it returns multiple lines where I am expecting only one line. When I run the procedure by itself, without the trigger, it runs as expected. Truth is, I created the trigger based on an example I found online, and I am not sure how to modify it to my needs. I don't need the data I am generating in the AFTER EACH ROW section. It exists because the trigger doesn't seem to run otherwise. Any help would be highly appreciated.
    create or replace trigger test.requisitions_trigger
      FOR INSERT OR UPDATE ON test.supply_items
    COMPOUND TRIGGER
    TYPE t_change_tab IS TABLE OF test.tab1_audit%ROWTYPE; g_change_tab t_change_tab := t_change_tab();
    AFTER EACH ROW IS
    BEGIN
      g_change_tab.extend;
      IF INSERTING THEN
        g_change_tab(g_change_tab.last).action := 'INSERT';
      ELSE
        g_change_tab(g_change_tab.last).action := 'UPDATE';
      END IF;
      g_change_tab(g_change_tab.last).created_time := SYSTIMESTAMP;
    END AFTER EACH ROW;
    AFTER STATEMENT IS
    BEGIN
      test.Requisitions;
    END AFTER STATEMENT;
    END requisitions_trigger;

    In your Re: Mutating Table error - Compound Trigger, the REQUISITIONS procedure was taking an argument that was taken from the row being inserted or updated. In this version, there is no argument. If the REQUISITIONS procedure takes no arguments (and just to harp on it, I'll reiterate that having a table and a procedure with the same name is more than a bit confusing), then you just need a statement level trigger. A statement level trigger is free to query the table being modified all it likes without raising any mutating table concerns (because the current statements changes are either guaranteed to have not been applied or to have been completely applied, there is no risk of seeing data in an inconsistent state).
    Justin

  • Using grep to find one match per line

    Hi,
    How do you get grep to return a single line even when multiple matches are found on the same line?
    I tried the (?-m) and (?-s) without success.
    eg. searching for the string "sin" in the following line should return only one result not 2.
    SG SIN Singapore
    I don't want the search to stop after a single match, it should continue on successive lines
    Thanks,
    SB

    Sure. Let GREP find an entire line at once:<br /><br />>^.*sin.*$<br /><br />But it won't work, I'm afraid. You insist that looking for "sin" <br />i will find <br />a match in "SG SIN Singapore"; and not one but two. It won't. Try it.<br /><br /><pre> __<br />(..)<br /> _\</pre><br />Got that? So use the 'case insensitive' switch<br /><br />>(?i)^.*sin.*$<br /><br />or (perhaps better, in this case), as you seem to search for the three letter codes, use<br /><br />>^.*\<SIN\>.*$

  • Using sed to translate dos line ends to unix line ends.

    Here is my first attempt at translation. I read in the sed man page how \ acts differently, but I see references to \r etc.
    I have a text file. I do not know if it has \r\n or \r as line ends.
    so I want to
    change \r\n to \n
    then change \r to \n
    Thus I end up with unix line ends.
    mac $ echo -ne  "1\r\n2\r\n" | sed "/\r\n/\n/g"
    sed: 1: "/\r\n/\n/g": invalid command code \
    mac $ 
    I left out the Mac conversion of \r to \n.
    I did a google search looking for the conversion. Lots of attempts at conversion. Lots of people eliminated the \r, that wasn't my idea. I moved to Perl after giving up on sed. Thanks everyone who read & responded to my previous Perl post.
    Robert

    Cole Tierney wrote:
    Sed on linux will honor carriage returns entered as
    . BSD sed does not appear to. I've confirmed this on Mac OS 10.3.9 and 10.4.11. On those systems you need to enter a carriage return as a literal using control-v control-m. The carriage return is then displayed as ^M. This can be confusing in forums since people will try to enter it as it is displayed (shift-^ shift-m).
    I was unfamiliar with this method of escaping. I saw references to this in my Google search. I am using the commands in an
    Applescript, so I didn't know how to enter.
    http://discussions.apple.com/edit!default.jspa?messageID=12681001
    My work around is to let bash deal with the carriage return using $'
    '. The trade off is you then have to look at a lot of single quotes. I find it easier to think of it in a couple steps. To expose the $'
    ' to bash you first split the sed with a couple single quotes at the point where you want the carriage return to appear.
    sed 's///' <- initial
    sed 's/''//' <- split
    sed 's/'$'
    ''//' <- insert
    </div>
    I didn't know about this use of $.
    If were dropping down to bash, then what is the deal with this:
    mac $ echo -ne  "1
    2
    " | sed  's/'"
    "'//' | hexdump
    0000000 310d 0a32 0d0a                         
    0000006
    I thought double quotes escaped things.
    The input for your second example has a line with more than one carriage return. My sed only deletes one carriage return per line. Another option is to anchore the match at the end:
    sed 's/'$'
    ''$//'
    I saw the linux version of this, but didn't see the trick of the $ forcing line end and the linux version didn't work for me on Tiger.
    This ends my quest for a tiger version of sed.
    (( At least for DOS, I think I'll forget the classic version of Mac OS. ))
    Thanks.
    Robert

Maybe you are looking for