Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: GREP expression help #62633
    angeldesigner34
    Participant

    I have a bit of a GREP dilemma. How do you find consecutive tabs?

    <TAB> = Actual Tab

    Company:A<TAB>Address:A<TAB>Phone:A<TAB>Contact Person:A<TAB>Web Address:A

    Company:B<TAB>Address:B<TAB>Phone:B<TAB>Contact Person:B<TAB>Web Address:B

    RESULTS:

    Company<TAB>Address<TAB>Phone<TAB>

    <CARRIAGE RETURN>Contact Person<CARRIAGE RETURN>

    Web Address

    I want to select all the info before the fourth <TAB> including the <TAB> and replace with the same info except with a <CARRIAGE RETURN> before and after the info.

    in reply to: GREP expression help #62632
    angeldesigner34
    Participant

    Jongware said:

    GREP is “greedy” by default, and it will try to grab as much as it can, while still doing exactly what you asked for. So in your multiple-refs case, it exactly does as told: start with 'ref”, then some unspecified other stuff, then end at (the very last) closing parens.

    Fortunately, you can switch this off and tell GREP to use the shortest possible match:

    (ref..+?)

    (Note that I inserted the — probably — missing backslashes ;) The forum software removes single s, so to get you must type ).

    There is no need, by the way, for your construction

    [.].+

    to force a “literal” full stop. Just add a single backslah before it to make it loose its magic properties.



Viewing 2 posts - 1 through 2 (of 2 total)