3

I am working on a macro in TextPad. I want to select multiple lines of data between two stars. For example:

abc
*
cvb
vvnbj
vnbvn
*
cvb

I want to select the three lines between two stars. How we can select these using regular expression in TextPad?

LeonardChallis
  • 7,759
  • 6
  • 45
  • 76
user1736135
  • 31
  • 1
  • 3
  • I don't know Texpads regex engine, but apparently you can use `\n` to specify newlines: http://stackoverflow.com/questions/7300732/multiline-regular-expression-with-textpad?rq=1 – SvenS Apr 12 '13 at 11:04
  • There are bugs with textpad's `\n` in capturing groups unfortunately – LeonardChallis Apr 12 '13 at 11:12

1 Answers1

4

This regex string should capture the stars and whatever is in between.

\*[^*]+\*

Regex Tester permalink

furier
  • 1,934
  • 1
  • 21
  • 39