sorry my bad english
I need your help,
I can search within a parenthesis with \((.*)\)
ex: hello (world) bye, need apply a CharacterStyle to "(world)" with CharacterStyle
hello (world) bye
similar script:
var active_doc = app.activeDocument; var search_string = /\((.*)\)/ig; var text_frames = active_doc.textFrames; var italicStyle = active_doc.characterStyles["italica"]; if (text_frames.length > 0) { for (var i = 0 ; i < text_frames.length; i++) { var this_text_frame = text_frames[i]; italicStyle.applyTo(this_text_frame.textRange); if (new_string != this_text_frame.contents) { this_text_frame.contents = new_string; } } }
thanks, sorry my bad english I speak spanish