I have 2 problems to solve:
1: in a discussion, i have time in format (e.g. 11:04pm). i want to delete these. (anything)pm/am -> to nothing. how sould i search for these ?
2: in this same discussion, i have also two names. i want to replace these with a special character (e.g. a square or triangle) perhaps whit a color.
If all the times are inthe format in yru example, this should find them: \b\d*:\d\d[ap]m\b You can replace with nothing. You'll probably want to find multiple spaces after that since this doesn't address the spaces surrounding the time. You could include the leading space if the time is never the start of the line, or the trailing sapce if it's always the start.
For the names the easiest might be to replace the name with formatted contents of the clipboard after copying your special symbol.
ok, so i have tried, what you had written, but it didn't find the "times".
now i have a bit difference in it (there is a space beetwen numbers and am/pm). here is a sreenshot:
i want to delete the date, and time.
No, the expression I wrote before will not find a time with a space between the numbers and the am/pm but adding the space into the expression will, like this:
\b is a word boundary, so \b\d*:\d\d looks for zero or more digits (which really isn't what I intended, but it isn't fatal) followed by a colon and two more digits as the beginning of a "word." [ap]m\b lokks for a or p followed by m at the end of a word. An improved expression would be:
the \d? tells ID to that the digit can appear 0 or one time, so you can have either one or two digits before the colon, but not more or none, and exactly two after.
Are you saying now that you want to delete the entire line with the date and time? That can be done as well, but we need to know where the paragraph breaks are, and if there are differnt paragraph styles applied to the lines to know the best approach.
none of them are working.
here is a screen shot for each:
You're on the wrong tab. These ar GREP quries, but you've entered them into the Text search field.
The good news is that the date and time lines appear to be separate paragraphs which wil make them relatively easy to remove if that is your intent. Do they have a unique paragraph style?
you were right, thank you.
one more thing: i want to see the time only (so i want to delete the date).
+ i would like the time to bee aligned right (ok, i can do that), but is there a way to have the time and the name at the same line. name aligned to left and time to right. (in my pscr the name is Putnoki László Tamás).
If the paragraph style is already right-aligned, replace with $2 or if not you can replace with ~y$2 which will add a right indent tab before the time.
^ is the marker for the start of the paragraph, $ for the end (in the find field), so you are looking for all characters from the start of the paragraph and the paragraph must end with the time. The parentheses divide the query into sub-expressions so you can use just a portion of the found text. Changing to $2 tell ID to replace the paragraph with the the text inthe second sub-expression, which is the time.
okey, that worked again.
now, how i get the name and time into same line ?
Sorry, missed the part about the same line the first time. Now that you have things as they are, search for (\r)(~y) and replace with $2
You might like Peter Kahrel's e-book about GREP in InDesign that's available from O'Reilly.
okey, it starts to be nicer.
1. how can i change into a custom color (e.g. orange), i've found just a few there.
2. i want to replace some caracters into .gif smileys like this how can i do that ?
1. Set up some character styles with the character color set to the swatch you want to use (create the swatch, if necessary). It looks like you want to apply differnt colors to different names, so you can't do it as a nested style in the paragraph style, but you can do plain text searches for the names using find/change and apply the color style inthe change formatting, or if you don't have lots of names you can do it automatically as GREP styles in the paragraph style definition (just enter the Names one at a time) and anywhere one of the names appears in a paragraph carrying that style it will change color. If you have a lot of GREP styles though, it can affect performance.
2. I think for the character replacement you'll want to copy the gif to the clipboard, then enter the appropriate character in the search field and replace with Clipboard COntenets, Formatted whcih you can choose from the Other selections in the dropdown you get it you click the @ symbol next to the field. Wheter you do this as a plain text search, or as GREP would depend on whether is is always the same character you want to replace, or if there are multiple characters do you want different repalcements for each.
1. yes i have tried exactly the same, but there are only a few colors there:
(e.g. i can't select orange, or any custom color)
2. that doesn't work neither in text nor in grep.
b.t.w. i want to use this to change:
Before you can choose a custom color for the text you need to create a new swatch for it.
The repalcement works here, so I suspect it's what you have on the clipboard. Place the gif on the pasteboard and size it the way you want to use it, then select it and copy to the clipboard.
thanks for your time, that you had spent on me ! thank you for the fast, clear and useful answers ! i've learned a lot. (sorry for my bad english, and uncomprehending.)
maybe if a problem occures, i could right here some more
i appreciate, thank you !!
For a native English speaker I would recommend some training materials, for example Sandee Cohen's Visual Quickstart book for InDesign, or the video training on Lynda.com, but I'm not familiar with waht is available in other languages. If you tell us what your native language is, though, we have regular responders from around the world who might have a good recommendation for you.
i'm from Hungary.
one thing more:
when i place this smiley gif into the document, it scales it up. why that ?
i want to see it like my browser displays it, and like i see it in fb f.e.g.
one thing more:
when i place this smiley gif into the document, it scales it up. why that ?
Do you mean when you place it before copying, or after the Find/Change? You probably need to scale it to the size you want to see after placing and before copying.
ok, its same size, but indesign displays it strangely (altough it is set to high quality display). photoshop is perfect ? why the difference ?
Do you have High Qualtity Disopaly enabled under View > Display Performance?
Might also just be the way ID dispalys the preview. Im Photoshop you are viewinghte actual pixels, in ID it's a screen preview. Hpow does it look in the exported PDF or in Print?
At 100% on screen in ID and Photoshop it looks essentially identical here, though it looks and prints pretty badly in the PDF. Of course it looks aout the same printed from Photoshop, but it's only 14 x 14 pixels at 72 ppi, so you really can't expect much in print. That image was meant for use on the web. If you want something crisp in print, draw a smiley in Illustrator and use that instead.
now i want to copy-paste a long text. in the first page i press ctrl+v (primary text frame is on), and it autoflows, but it stops somewhere (after 190 pages), and doesn't display the rest of the text. it sais the text is overset, and i can only see it in the story editor. how can i make it display the whole text ?
That usually indicates something about the text in the first line that's overset that makes it impossible for ID to fit it in the frame. A long string with non-breaking spaces and hyphenation not allowed can do that, as can applying No Break to a lot of text. I've seen text that was in a size too large to fit a single word, and indents that combined were wider than the column. Keep options will be the cause on occasion, too. You'll need to examine that text in Story Editor and do a bit of detective work.
ok, thanks. i managed to solve it.
but i have another problem again, still don't understand those expressions...
i managed to add a right indent before each time, but i have a few time with date in the same line. i want to add a right indent before these too.
i tried an expression, it works: http://kepfeltoltes.hu/121231/8330170991_www.kepfeltoltes.hu_.jpg
but it finds the single time too (and there i don't need another right indent, because i have already one):
how can i find ONLY the lines, where there are both: date and time ?? (and add a right indent before these)
In these lines are all of thetimes in italics? If they are you can look for \d\d?:\d\d [ap]m$ (which is a time at the end of a paragraph). Set the Find formatting options to Italic, and in the change formatting either set the alignement to Right Aligned or apply a pragraph style that's right-aligned.
In fact, now that your other times are all on a line by themselves, it might be cleaner to change from the right-indent tab to a right-aligned style for them, too.
You can find the right aligned tabs by searching for ^~y Replace with nothing and set the right aligned as aparagraph style or local override inthe change format options as above.
okey, but now i can't bring them into one line, as earlier with the (\r)(~y) replace. because there are no right-indent tabs.
http://kepfeltoltes.hu/121231/13121166823_www.kepfeltoltes.hu_.jpg how can i do that ?
OK, sorry. I'd forgotten that was the goal. None of what I said in the last post was useful for moving the times/dates onto the previous line. Can you undo or were you working on a copy of the file (a really good idea in case of these mistakes)?
Please post another screen shot of what the text looks like now (after any recovery from my previous advice if possibile).
it's all right. i redo the steps:
1) it looks like this: http://kepfeltoltes.hu/121231/13121166823_www.kepfeltoltes.hu_.jpg
2) i search for: ^(\b\d\d?:\d\d [ap]m\b)$ and replace with: $1 + align: flush left ---> http://kepfeltoltes.hu/121231/6270245444_www.kepfeltoltes.hu_.jpg
3) as it is in the picture, the times are aligned right with indent, but the date and times don't. and i have to align the date and time lines the same way with indent. http://kepfeltoltes.hu/121231/8853238115_www.kepfeltoltes.hu_.jpg
Starting from what it looks like now, try this:
Find: (\r)(.+\b\d\d?:\d\d [ap]m)$
Find: ~y(?=~y) and leave the change field blank. That should remove the duplicate right indent tabs.
I have not tested this, so please try it on a copy.
Don't know if you still desire a vector smiley face or not. The following link is to an Illustrator file. You (or anyone) can feel free to use it, modify it, commercial use, etc., etc., forever. Sooner or later it will be cleaned out of the temp folder on the web site.
Do note it is larger than you need for this purpose.
Take care, Mike
okey, thanks. i want now search for only the date and times AFTER the right indent tab.
i've tried this expression, but is finds the whole line. so i can't format the date and times individually from the names. http://kepfeltoltes.hu/130101/12009388407_www.kepfeltoltes.hu_.jpg
you can use a positive look behind to find the right indent tab without selecting it and then only select the text that follows it.
(?<=~y).+$ will find any text up to the end of that paragraph following a right indent tab.
(?<=~y).+\b\d\d?:\d\d [ap]m$ will match only if the last part of the line is a time.