Thanks winterm, but I'm sure we don't need scripting for this. The secon part of the post you mention looks like it could ansewr my question, but since I don't fully understand the grep code they are using, I can't adapt it to my needs.
I'll take a deeper look at it anyway.
That script is ready to use, intuitive, and requires no special knowledge. Easy.
If you want more semi-manual control, GREP is the way to go.
Obi-wan gave excellent samples there in that thread, regex he used are pretty simple to understand. He covered your question fully, I believe.
There's a lot of GREP code sheets floating around on the net. Do yourself a favor, download one or two of them.
Also consider a tiny bit outdated but still excellent Jongware's script WhatTheGREP (google for it). It's a tool to explain given GREP expression.
yep, that script looks like the way to go. but the link seems to be broken.
Or is it that that long code is the script?
I'm not sure into wich kind of file should I copy it.
Read the very first line in 'Correct Answer': Link lost!
That's why Obi reposted it.
Yes, you should copy the whole code from the beginning right after the screenshot, save it in a plain text editor as *.jsx file and place that jsx file in your Scripts panel.
yes yes I read that. Sorry for being redundant
It worked. Thanks a lot.
I should note, though, that it doesn't work when the styles are in subfolders, since it result in the name being to wide for the script menu list. Of course it can be easily fix getting those styles out of the folder.
Thank you winterm!
You mean your styles are in style folders? If that's the case, I just saw a script the other day that pulls all the styles out of their style folders for you. Let me know if that would be handy and I'll see if I can track it down. And glad the other script worked for you!