regexp

Mr X monsieurx at crosscomm.lu
Thu Jan 9 11:34:01 EST 2003


I remember using BBEdit AppleScripts agents within HC and that was quite
good because BBEdit handled GREP such as /n+. Problem was passing the data
to bbedit and have it work while "returning" the hand to HyperCard. Which
was impossible!

On WinDoze you could try UltraEdit with
  get shell("cmd.exe + params...")
never tried though...

cheers
Xavier


> -----Original Message-----
> From: metacard-admin at lists.runrev.com
> [mailto:metacard-admin at lists.runrev.com]On Behalf Of
> xbury.cs at clearstream.com
> Sent: Wednesday, January 08, 2003 1:31 PM
> To: metacard at lists.runrev.com
> Subject: RE: regexp
>
>
> Andu,
>
> I ranted about this sometime ago but the phylosophy behind GREP in
> MC is for one liners "only" I was told...
>
> I had a similar problem when parsing control statements in a code
> translator
> and later in my Script Editor for the indexing...
>
> Best is to first find the start of the string and match it's ending string
>  (with offset("endofstring",container,posoffirststring). Then you
> remove the
> returns
> and then you can use the GREP if you so wish...
>
> Thats's the simple way...
> Otherwisely, you could replace all returns with a double
> character and then
> use GREP...
> You replace your double character with returns before returning
> the text...
>
> Last but not least, use the two forms above, identify your chunk,
> remove the
> returns,
> replace with matchChunk your string and continue scanning your html...
>
> Hope it helps!
> Xavier
>
> > -----Original Message-----
> > From: andu [mailto:undo at cloud9.net]
> > Sent: 08 January 2003 13:15
> > To: metacard at lists.runrev.com
> > Subject: regexp
> >
> >
> > I need some help with matchChunk(). Here's the problem, I
> > need to parse
> > html pages for a certain chunk and replace it with an other.
> > Unfortunately
> > I cant use the good old "replace x with y in z" because the
> > chunk sometimes
> > is on one line other times on many.
> > Here's an example:
> >
> >         <p><font face="Arial" size="2"><b>Welcome
> >           <!user-name>
> >
> >           to our site</b></font> </p>
> >
> > I want to replace "Welcome <!user-name> to" with "This is",
> > for example.
> >  I've spent hours trying to find the right matchChunk()
> > expression given I
> > know the first (Welcome) and last word (to) of the chunk but without
> > success, I can only get one of them at a time. Thanks in
> > advance for any
> > suggestions.
> >
> > Regards, Andu Novac
> > _______________________________________________
> > metacard mailing list
> > metacard at lists.runrev.com
> > http://lists.runrev.com/mailman/listinfo/metacard
> >
>
>
> Visit us at http://www.clearstream.com
>
> IMPORTANT MESSAGE
>
> Internet communications are not secure and therefore Clearstream
> International does not accept legal responsibility for the
> contents of this message.
>
> The information contained in this e-mail is confidential and may
> be legally privileged. It is intended solely for the addressee.
> If you are not the intended recipient, any disclosure, copying,
> distribution or any action taken or omitted to be taken in
> reliance on it, is prohibited and may be unlawful. Any views
> expressed in this e-mail are those of the individual sender,
> except where the sender specifically states them to be the views
> of Clearstream International or of any of its affiliates or subsidiaries.
>
> END OF DISCLAIMER
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>




More information about the metacard mailing list