Print

Print


Hi Matt!

You can match a string of all caps letters like "[A-Z]". Those brackets say
"match anything inside" and the hyphen indicates the full range of capital
letters.

You cannot, unfortunately, match italics since that's formatting and not
text. Regex is really only meant for strings of characters and not their
formatting.

Lastly, I'd be remiss if I didn't point you to Bohyun Kim's nice intro to
regex: http://acrl.ala.org/techconnect/?p=3549

Good luck!
On Tue, Jul 7, 2015 at 08:56 Matt Sherman <[log in to unmask]> wrote:

> Hi all,
>
> I am working my way through teaching myself regex to parse an annotated
> bibliography docx file and had a question as I can't seem to get a succinct
> answer from Google.  Is it possible to have regex find words, or in the
> case names, in displayed in all caps?  Also similarly is it possible to
> have regex find words, or in this case titles, that are italicized?  Given
> how the document is formatted doing both would be nice so that I could
> parse them into a table or or database, but I cannot find a clear answer on
> that, though I am very new to regex so it is probably jumping into the deep
> end on this.  Any answers are appreciated.
>
> Matt Sherman
>