Skip to main content
SuzzyFlamingo
Inspiring
March 13, 2025
Answered

Searching and replacing with styles

  • March 13, 2025
  • 1 reply
  • 793 views

Hi friends!

Sorry for posting such an ignorant question, but I am still just beginning.

If I have text that is within square brackets [ffgggggvgtgg] how can  I search for any string of text like that and apply a certain char style to that text.

I think I could handle this in Word in ID I don't have a clue.

 

Thank you

Susan

 

Correct answer Robert at ID-Tasker

@James Gifford—NitroPress

 

If you apply any kind of formatting - you don't have to fill Change To - just left if blank.

 

If there is no formatting to be applied - then empty Change To will delete found text. 

 

1 reply

James Gifford—NitroPress
Legend
March 13, 2025

There are several approaches of varying complexity (and something like automation) but the simple answer is just to use Find/Replace — actually, the GREP variation of it.

  • Search for: \[.+\], which is a string of any number of any characters between square brackets. (Note you have to 'escape' the brackets with a backslash, so they are interpreted as a literal character and not a string formatting limiter.)
  • Replace with: $0, which is all "found text."
  • Under "Change Format," specify the Character Style you wish to apply.

 

 

GREP is a bit mysterious and tricky to master, but it's the key to all complex searches and "replace" operations.

Robert at ID-Tasker
Robert at ID-TaskerCorrect answer
Legend
March 14, 2025

@James Gifford—NitroPress

 

If you apply any kind of formatting - you don't have to fill Change To - just left if blank.

 

If there is no formatting to be applied - then empty Change To will delete found text. 

 

SuzzyFlamingo
Inspiring
March 14, 2025

Thank you for your attention!