• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

add an exclamation point at the end of each character style by grep

Explorer ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

I have a bit of a complex question in grep. I try to add an exclamation point at the end of each character style. I found a string on the internet that recognizes the end of a character style (attached) but I can't add the exclamation point. Thanks for the help,

TOPICS
How to , Type

Views

483

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 29, 2020 Aug 29, 2020

Sorry, I did not get notified about the reply to this post, hence did not reply earlier. For the first question I did not quite understand what you are trying to do, please share the code changes you made and the screenshots of what you start with, what you want to get, and what happens incorrectly. This will make it easier to answer.

For the other query, I would suggest creating a new post, that would provide the query a wider audience. I have not worked extensively with Footnotes so it's bette

...

Votes

Translate

Translate
Community Expert ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

I am not able to download the pdf that you attached. I am not sure if grep styles would work here, grep styles don't allow adding in content as far as I know. What you need, in my opinion is Grep find/change. It should be simple, in the "find format", add the character style to find and in the "change to" use $1!

If this is not what you need, then paste some screenshots of how your document looks and how you want it to be changed.

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

Really $1!
Was supposed to work
But it's not working.
Attach open file 

 

https://www.dropbox.com/s/h3djhgsfw5oy00k/q%20Folder.zip?dl=0

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

I don't know who wrote this Grep Code but no interest to make it so complex!

Just:

Find: .+

Replace by: $0!

 

(^/)  The Jedi

 

Btw: your code doesn't work just because, using "(?<!.).+(?!.)", it includes 2 looks that border a ".+"

use the Replace by: "$0!" to make it work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

The reason I think is that finding for format does not create a capturing group, so $1 does not point to anything, and hence it's taken literally. I don't think this can be handled using just the UI interface. I have put a script that should help you.

 

app.findGrepPreferences = null
app.findGrepPreferences.appliedCharacterStyle = "מודגש"
var result = app.documents[0].findGrep()
for(var i = 0; i < result.length; i++)
	result[i].contents += "!"
	
app.findGrepPreferences = null

 

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

Excellent! Thank you!
I have another request from you if you can help me that is also related to the script, maybe something a little more complex. I would be happy if you help me. Write to me if you agree

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

If it's something that would need a solution developed then you can drop me a DM, we can connect and discuss it further. If it's something that needs some ideas and is not related to this query feel free to post a new query on the forum and I or someone from the community would surely pitch in with their comments.

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

I tried to adjust the same code so that it will add in place at the end the style of the paragraph, at the end it is the character style but it does not work well. (Works only on the end of all paragraph) I would appreciate your help.
 
And the other thing, unrelated to it, I'll add here, and you'll decide if you can resolve or need a new call:
 
I search script that set title in the title of the footnote. like this:
 Screen Shot 2020-08-28 at 15.43.44.png

 
Now, we can only to insert line.
 
I have already posted this question in the forum,
I was told to try using an anchored object but it does not work perfectly.
(if i put footnote before same page).
 
I would also be happy to help you.  for example, I've been researching the pitstop pro lately and have learned a lot.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 29, 2020 Aug 29, 2020

Copy link to clipboard

Copied

Still waiting for a response ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

Well tried! …

 

I've indicated you 2 weeks ago I've written a script about what you try to get but, as you show, you continue to be only interested by a for-free solution and still wait for someone who will write it for you for free!

 

https://community.adobe.com/t5/indesign/script-to-insert-text-in-footnote-title/m-p/11365323?page=1#...

 

(^/)  The Jedi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 29, 2020 Aug 29, 2020

Copy link to clipboard

Copied

Sorry, I did not get notified about the reply to this post, hence did not reply earlier. For the first question I did not quite understand what you are trying to do, please share the code changes you made and the screenshots of what you start with, what you want to get, and what happens incorrectly. This will make it easier to answer.

For the other query, I would suggest creating a new post, that would provide the query a wider audience. I have not worked extensively with Footnotes so it's better to get opinion of other forum experts.

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

Attach what I need.
many thanks!!!

 

https://www.dropbox.com/s/5a5jwiuppmg0bvu/www.zip?dl=0

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

Thanks,
Michel sent me a simpler solution now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 03, 2020 Sep 03, 2020

Copy link to clipboard

Copied

LATEST

I don't know who considers this answer as correct but this mention makes absolutely no sense!

 

(^/)  The Jedi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines