SPUG: Problems with a regex
Mark Yocom
myocom at microsoft.com
Tue Jun 5 19:23:39 CDT 2001
...though I would generally recommend against using regexen to parse
(X?HT|X)ML documents. It's very difficult (and indeed, sometimes
impossible) to get right. HTML::Parser and/or the various XML modules
may be better suited for this sort of work.
> -----Original Message-----
> From: Tim Maher/CONSULTIX [mailto:tim at consultix-inc.com]
> Sent: Tuesday, June 05, 2001 5:15 PM
> To: Brittingham, John
> Cc: spug-list at pm.org
> Subject: Re: SPUG: Problems with a regex
>
>
> On Tue, Jun 05, 2001 at 04:47:26PM -0700, Brittingham, John wrote:
> >
> > Having trouble replacing the following string:
> <!DOCTYPE CCML3 PUBLIC > "-//ATT//dtd ccml3//EN" []>
> > Any help would be appreciated.
> >
>
>
> Looks like a good place to use an alternate delimiter (like |)
> and the quoting metacharacters, \Q\E, to automatically
> backslash all the appropriate stuff:
>
> s|\Q<!DOCTYPE CCML3 PUBLIC > "-//ATT//dtd ccml3//EN" []>\E|WHATEVER|;
>
> *=============================================================
> =============*
> | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649;
> ask for FAX# |
> | Email: tim at consultix-inc.com Web:
> http://www.consultix-inc.com |
> | TIM MAHER: Unix/Perl
> DAMIAN CONWAY: Adv. Perl COLIN MEYER: Perl/DBI |
> | *We are currently scheduling On-Site Classes on UNIX and
> Perl topics!* |
> *=============================================================
> =============*
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - -
> POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
> Replace ACTION by subscribe or unsubscribe, EMAIL by your
> Email-address
> For daily traffic, use spug-list for LIST ; for weekly,
> spug-list-digest
> Seattle Perl Users Group (SPUG) Home Page:
> http://www.halcyon.com/spug/
>
>
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list