Skip navigation
Currently Being Moderated

How to grep 21 roman numbers? Or how to adapt 21 queries for different styles?

Jul 18, 2012 12:45 PM

After using some grep recipes the results are poor:  problems related with numerals like c/d or something like some words in other languages have parallel meaning (mil is 1000 in Spanish) I suppose (?0 that grepping the 21 roman numbers required in some books for centuries could be enough.


Could be processed as a grep style or just  in the f/change window?



Making queries is a problems as each query is related to a couple specific styles and do not know how to adapt them).


How to grep: I, II, III, IV, etc?

  • Currently Being Moderated
    Jul 18, 2012 2:25 PM   in reply to camilo umaña

    "mil" is also a valid Roman number, so how would a GREP style see the difference? (One way could be the observation that your example list of Roman numbers only contain uppercase...)


    I understand that your primary use would be something like "the XIX century" -- What would your proposed GREP style do? Make the Roman number small caps? In any case, the key word here is "century", so if you find a Roman number followed by that word, you can have your GREP style do something with it. All -- and I mean ALL -- other cases then must be handled manually.


    As for the match ... hmmm ... writing out the twenty-one numbers is boring (and yet doable). Maybe something like




    ... I'm not sure I'm getting all of 1..21 that way, but it'sa start.

    Mark as:
  • Currently Being Moderated
    Jul 19, 2012 4:33 AM   in reply to camilo umaña

    This kinda works - I'm sure Jongware can pick holes in it




    Problem is though, it won't select the "c" at the end of the list?


    If I remove the \b part it work just fine. Is there another way to encase an entire word?


    It certainly won't work in every situation though. There are loads of instances where a "c" or "v" or even an "x" can be used in a standalone context, or together within a word.

    Mark as:
  • Currently Being Moderated
    Jul 19, 2012 10:23 AM   in reply to camilo umaña

    I use something like Eugene's approach to *search* for Romans, but I darenot use it in a GREP style (as your typical English text is riddled with single I's, and I need to catch possible single capital letters as well). If Eugene's seems to work for you so far, you can try this one:




    One of the drawbacks I've found with automating this is when marking page numbers. "p. iv" works, as does "p. xlvii" -- but with an added "c" for hundreds it also locates "p.c.", which is a common shorthand for "personal communication"...

    Mark as:
  • Currently Being Moderated
    Jul 19, 2012 12:32 PM   in reply to camilo umaña

    Ah -- not behind my computer (looking at an iPad here ;) ) but can you test if my GREP works if you add a single space before the i in your test text?


    Actually, I think this should NOT make it work ... theoretically! The \b code is a "word break", and the start of a paragraph *ought* to match that.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points