Have an account? Sign in
"*" indicates required fields
You agree that CreativePro Network may send you emails, including the newsletter selections above. You can unsubscribe at any time.
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
New user? Create an account
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
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.
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.
This site uses cookies, but not the kind you eat. We use cookies to remember log in details, provide secure log in, improve site functionality, and deliver personalized content. By continuing to browse the site, you accept cookies.