Highlighted

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

Community Beginner ,
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,

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

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

TOPICS
How to, Type

Views

114

Likes

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

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

Community Beginner ,
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,

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

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

TOPICS
How to, Type

Views

115

Likes

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
Aug 28, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Aug 28, 2020 0
Community Beginner ,
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

 

 

 

Likes

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
Reply
Loading...
Aug 28, 2020 0
Advocate ,
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.

Likes

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
Reply
Loading...
Aug 30, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Aug 28, 2020 0
Community Beginner ,
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

Likes

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
Reply
Loading...
Aug 28, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Aug 28, 2020 0
Community Beginner ,
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.

Likes

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
Reply
Loading...
Aug 28, 2020 0
Community Beginner ,
Aug 29, 2020

Copy link to clipboard

Copied

Still waiting for a response ...

Likes

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
Reply
Loading...
Aug 29, 2020 0
Advocate ,
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

Likes

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
Reply
Loading...
Aug 30, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Aug 29, 2020 0
Community Beginner ,
Aug 30, 2020

Copy link to clipboard

Copied

Attach what I need.
many thanks!!!

 

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

 

 

Likes

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
Reply
Loading...
Aug 30, 2020 0
Community Beginner ,
Aug 30, 2020

Copy link to clipboard

Copied

Thanks,
Michel sent me a simpler solution now.

Likes

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
Reply
Loading...
Aug 30, 2020 0
FRIdNGE LATEST
Advocate ,
Sep 03, 2020

Copy link to clipboard

Copied

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

 

(^/)  The Jedi

Likes

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
Reply
Loading...
Sep 03, 2020 0