Thread View: adobe.scripting.indesign
3 messages
3 total messages
Started by Len_Swierski
Fri, 27 Feb 2009 21:22
[JS, CS3] How to find text that is NOT a paragraph return
Author: Len_Swierski
Date: Fri, 27 Feb 2009 21:22
Date: Fri, 27 Feb 2009 21:22
4 lines
858 bytes
858 bytes
Hi all, This is probably an easy one, but I can't seem to get the idea. I want to search within some text and find everything EXCEPT the paragraph return. What would be the way to build that expression? Thanks for any response. Regards, Len Swierski
Re: [JS, CS3] How to find text that is NOT a paragraph return
Author: Peter Kahrel
Date: Fri, 27 Feb 2009 22:41
Date: Fri, 27 Feb 2009 22:41
6 lines
911 bytes
911 bytes
Search using this GREP expression: "[^\\r]" I don't know what you want to achieve, but you could also use "(?s).+" (?s) enable single-line mode, which makes the paragraph mark invisible, so to speak (and loosely formulated). (?s).+ therefore matches whole stories. Peter
Re: [JS, CS3] How to find text that is NOT a paragraph return
Author: Len_Swierski
Date: Fri, 27 Feb 2009 23:37
Date: Fri, 27 Feb 2009 23:37
4 lines
1653 bytes
1653 bytes
Thanks, Peter! I appreciate your help but I have found another solution. I am amazed at my own stupidity sometimes. You see, I do my scripting in a very lame sort of way because I have never used Javascript outside of InDesign. As such, I find myself at a disadvantage because the documentation that Adobe provides assumes that you are aware of many of the basics. Case in point: I have always had trouble manipulating strings because I NEVER KNEW that you could search and replace strings! I just could not find examples of this in the Adobe documentation. So here I was in some cases adding temporary textFrames so I could get to my strings as text contents and then removing the temporary textFrames at the end of the script. In this particular case I needed to merge several paragraphs into one paragraph. Now that I know how to search & replace strings, it is so simple to strip away all the paragraph returns (which are included in text contents). I am learning, albeit rather slowly. Thanks again. Regards, Len Swierski
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads