Skip to main content
dublove
Legend
May 25, 2021
Question

Can regular expressions be used to distinguish abc columns?

  • May 25, 2021
  • 2 replies
  • 641 views

I need to extract the index of the article entry. My document is divided into three columns (a, b, c from left to right). I need to mark their page numbers and which column belongs to a b c

It's like this below.

I manually extract the index, I think the software is not easy to use.

Now the question is, how can I label a b c faster

The text is divided into three columns (a b c). Can regular expressions be used to distinguish abc columns?

This topic has been closed for replies.

2 replies

Legend
May 25, 2021
dublove
dubloveAuthor
Legend
May 25, 2021

It's like this below.

Community Expert
May 25, 2021

Interesting one! A possible way is as follows.

1. Create three character styles, name them a, b, and c. No formatting needed, you just need a wrapper.

2. Get yourself a script that applies these character styles as number style overrides to page references: if a page reference (or, index marker) is in column a, apply character style a, etc.

3. Generate the index.

4. Get yourself another script that looks for instances of character style a and inserts 'a'. Same with the instances of character styles b and c.

P.

Community Expert
May 26, 2021

I should have started with (naturally) 'No, you can't use a regular expression to determine a text column's index'. Regular expressions match text, nothing else.