Re: Test for multiples a character in a paragraph- Tex-Edit or OSAX
Re: Test for multiples a character in a paragraph- Tex-Edit or OSAX
- Subject: Re: Test for multiples a character in a paragraph- Tex-Edit or OSAX
- From: "Christopher C. Stone" <email@hidden>
- Date: Sat, 27 Jan 2001 15:28:00 -0600
>
> You could "set every character where it is aTab to verttab", and then loop
>
> through paragraphs, using "set character 1 of paragraph i where it = verttab
>
> to aTab".
___________________________________________________________________________
Greetings,
RegEx Commands will do a bang up job:
---------------------------------------------------------------------------
set t to " Now is the time for all good men...
Now is the time for all good men...
Now is the time for all good men..."
set t to REReplace t with "\\2" pattern "^\\t|(^([^\\t]+)\\t)"
set t to REReplace t with "{verttab}" pattern "\\t"
set t to REReplace t with "\\t" pattern ""
---------------------------------------------------------------------------
I'm using the bullet character in my pattern/replacement strings (hopefully it'll show up properly on list). In practice I'd use a more esoteric character.
{verttab} of course should be replaced with the ascii 11 character.
Best Regards,
Christopher Stone
______________________________
StoneWorks Computer Consulting
email@hidden