Page 1 of 1

Easy Pattern?

Posted: Thu Apr 21, 2005 6:24 am
by jbecker
Here is what I would like to accomplish but don't know how.

~6/12/91 (e.g.)
Short line of text (return)
that continues on second line (return)

Converted to this:

~6/12/91 (e.g.)
Short line of text that continues on second line (return)


It is probably easy, but how do I do this? Thanks for the help.

Jerry

Posted: Thu Apr 21, 2005 10:43 am
by DataMystic Support
Did you read the reference?

Code: Select all

~6/12/91 (e.g.) 
[ capture(0+ not cr or lf), cr, lf,
  capture(0+ not cr or lf, cr lf) ]
Replace with:

Code: Select all

~6/12/91 (e.g.) 
$1$2

Cannot make it work

Posted: Fri Apr 22, 2005 2:51 am
by jbecker
I tried your suggestion and I can't get to work. Here is an actual sample of the text, maybe that will help.

~6/21/90
Dewey copped a break
because of his position
Guess it's best to be on a city commission board, as in Wichita. Here
also?

I want to change it to this:

~6/21/90
Dewey copped a break because of his position

Guess it's best to be on a city commission board, as in Wichita. Here
also?

The date is not always the same and not every section has a two line headline. I hope this helps. Thanks,

Jerry

Posted: Fri Apr 22, 2005 8:39 am
by DataMystic Support
Naturally it won't work because you didn't say the '~6/21/90' section is variable.

Try:

Code: Select all

~[ capture(day, '/', month, '/', year, cr, lf )
  capture(0+ not cr or lf), cr, lf, 
  capture(0+ not cr or lf, cr lf) ]
Replace with

Code: Select all

$1$2$3