Did you try <span[^>]*>(.*)</span>

The problem is that this is a greedy match (anything from the first span
to the last </span>). I don't know if DW supports non greedy matches:
<span.*?>(.*?)</span>

You have to see if the . matches a newline (it probably doesn't). In DW
you could do (.|\n)* instead of .* to match all chars and newline.

[.\s\r\n\t] means dots, whitespaces(all), carriage return, newline and
tab (\r\n\t are not needed here, but the dot represents a dot in a
character set and not any character)

I'm pretty sure studio doesn't support escape sequences like \s\t\r\n.
It will match a literal s, r, n, t, ... (I don't know about DW)

HTH
Pascal

> -----Original Message-----
> From: Deanna Schneider [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 29 juni 2004 15:53
> To: CF-Talk
> Subject: regex in studio/dreamweaver
>
> Okay, I've tried a million variations of this regex in
> studio, and none of them work. All I want to do is dump all
> the stupid left-over word html spans....
>
> So that stuff like this:
> <span style='font-size:8.0pt;'>Activity</span>
>
> Becomes this:
> Activity
>
> I've tried:
> <span.*>(.*)</span>
>
> In studio I get a bad _expression_ error.
>
> In Dreamweaver, it finds some stuff, but doesn't find
> anything with funky white space. So, I tried
> <span.*>([.\s\r\n\t]*)</span> Which I _think_ says:
> find the literal text "<span"
> followed by any number of additional characters followed by
> the literal ">"
> followed by any number of charaters, spaces, carriage
> returns, line feeds or tabs (and remember this chunk)
> followed by the literal text "</span>"
>
> But, it doesn't find anything, even though there are hundreds
> like this:
> <span style='font-size:8.0pt;'>Selecting
>           key child development topics to teach others</span>
>
> What am I missing? (I so suck at regex.)
>
> --
> Deanna Schneider
> UWEX-Cooperative Extension
> Interactive Media Developer
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to