1

I'm new to the concept of using GREP. I work on documents which contain Australian Indigenous terms which contain special characters, for example, Ayers Rock's Indigenous name is Uluru, whereby the r should always have an underline/underscore.

As there is no glyph for this for easily Find and Replace, is there a way to search just for the r and change it's Character style to one that has underlines defined?

As I'm currently struggling with GREP my first guess and Google around came up something like this:

(?<=^Ulu)\x{72}(?= (u)
6
  • Out of curiosity: is'nt there a special character somewhere for aboriginal names? (I don't know anything about aboriginal writing)
    – Luciano
    Nov 2, 2018 at 10:10
  • No glyph in your current font, but for such a simple character I'd just use U+0332 from any other. Underlining looks very different.
    – Jongware
    Nov 2, 2018 at 11:35
  • @usr2564301 I tried this method, combined with (?<=Ulu)r(?=u), which finds the 'r', and when I hit replace (using \x{0332}, it underlines the 'r' but adds the missing character before it. So it would read something like Ulu ru. Nov 3, 2018 at 14:02
  • @Luciano Unfortunately, no such character/glyph exists in the font set we have to use (Roboto & Roboto Slab). It's easier with New Zealand Māori terms, as their native language uses overscore characters on their vowels (ie. ā / ē / ī / ō /ū), which are easy to find and replace accordingly. With Australian Indigenous, the underlined character appears more on consonants, such as (1) 'r' in Uluru, (2) first 'n' in Anangu (3) first 't' in Mutitjulu. Makes checking especially tricky in long information documents. Nov 3, 2018 at 14:03
  • Mike, you must not forget to apply another font to just the underline character. Also -- minor -- since this is a 'backspacing' character, it must occur after the 'r', not before.
    – Jongware
    Nov 3, 2018 at 14:21

2 Answers 2

1

This can be approached multiple ways. The most logical approach would be to just use a font which includes these language glyphs.

But, here's another option with your current setup:

  • format a first Uluru word with the proper formatting on the 'r'
  • copy that into the clipboard
  • use the normal (not the grep) find/replace as seen below, where ^c means 'Clipboard Contents Formatted'
  • hit 'Change All'
  • this is like a batch copy paste, so wherever Uluru is found, the replace will just paste the formatted Uluru word

enter image description here

1
  • Thanks for showing me this method! I will ultilise it for quick fixes. Nov 3, 2018 at 14:04
0

It's very simple,

(?<=ulu)r(?=u)
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.