Replacement question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to remove two recurring elements from my text document. On one
line is text ('ID'), and the next line is an number htat increases by one
each time (i.e. 1, 2, 3, up to ~10, 000). I would like to remove both of
these items. After the number is a text field that contains the important
information. Any suggestions?
Example

ID:
237
[Important text here]
 
Hi Kevin,

You have paragraph marks at the end of these lines?
ID:¶
237¶
[Important text here]

Then use "Edit > Replace", check "Match wildcards",
Find what: ID:^13[0-9]@^13
Replace with:
(leave the latter empty to replace the matched text with nothing)

^13 matches a paragraph mark, [0-9] matches any number 0-9, and [0-9]@
matches any number of numbers (237, 0102, 183658569, ...).

Regards,
Klaus
 
Kevin

If the lines end with a paragraph mark, try a wildcard replase with
ID:^13[0-9]@^13 in the find field and leave the replace with field blank.

If the lines end with a line break use ID:^l[0-9]@^l
 
Back
Top