• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Test for multiples a character in a paragraph- Tex-Edit or OSAX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Michelle Steiner <email@hidden>
  • Date: Sat, 27 Jan 2001 13:41:35 -0800

On 1/27/01 1:28 PM, Christopher C. Stone <email@hidden> wrote:

>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.

I copied and pasted your script, then replaced "{verttab}" with "*" in
the script.

The result is
" N o w i s * t h e * t i m e f o r a l l g o o d m e n . . .
N o w i s t h e * t i m e f o r a l l g o o d m e n . . .
N o w i s t h e t i m e f o r a l l g o o d m e n . . . "

Note the spacing between characters and the double spacing between words?

--Michelle



----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------


  • Prev by Date: Re: Test for multiples a character in a paragraph- Tex-Edit or OSAX
  • Next by Date: Re: R23's Osaxen Rant (or much too much ado about nihil)
  • Previous by thread: Re: scripts wont compile since 9.1
  • Next by thread: An Appleworks script won't run from net-booted iMacs...
  • Index(es):
    • Date
    • Thread