Don't need the lookarounds....
Use this regex and save $1 and $3 /(<a.*?"http://([^/]+/)+[^?]+?)([^=]
+=\S+\s+\S&?)/gx
Then use this on $2 to replace the spaces s/\s/+/gx.
Then push $1 and $2 back together to get your whole string.
That's the perl way...
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
"What is objectionable, what is dangerous about extremists is not
that they are extreme, but that they are intolerant."
-- Robert F. Kennedy, 1964
On Jun 5, 2007, at 12:58 PM, Steven Ross wrote:
I was actually just looking for a regex solution to parsing up many
lines of text, some of which contain urls. And if those url's have a
space on the query string to replace those spaces on the query string
with the + character.
I could use CF but, was trying to just get the regex. Possbly using a
lookahead or lookbehind assertion.
-Steven
On 6/5/07, Ajas Mohammed <[EMAIL PROTECTED]> wrote:
do you plan to save the complete url in a variable or just search
keyword in
a variable? For example varUrl = <a href="http://blah.com?
search=Some
Lingering Suspicion" target="_blank">"A Lingering Suspicion"</a>
or varUrl = "Some Lingering Suspicion"
Please clarify.
Ajas.
On 6/5/07, Steven Ross < [EMAIL PROTECTED]> wrote:
> in this string:
>
> <p><b>15) <a href=" http://blah.com?search=Some Lingering
Suspicion"
> target="_blank">"A Lingering Suspicion"</a></b></p>
>
> i want to search for the spaces inside:
>
> ?search=
>
> and replace those spaces with + so it should end up looking like
this:
>
> ?search=Some+Lingering+Suspicion
>
> Can this be done?
>
> thanks,
>
> Steven
>
>
>
> --
> Steven Ross
> web application & interface developer
> http://www.zerium.com
> [mobile] 404-488-4364
> [fax] 267-482-4364
>
>
>
-------------------------------------------------------------
> Annual Sponsor FigLeaf Software - http://www.figleaf.com
>
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @
http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by http://www.fusionlink.com
>
-------------------------------------------------------------
>
>
>
>
--
<Ajas Mohammed />
http://ajashadi.blogspot.com
No matter what, find a way. Because thats what winners do.
-------------------------------------------------------------
Annual Sponsor - Figleaf Software
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------
--
Steven Ross
web application & interface developer
http://www.zerium.com
[mobile] 404-488-4364
[fax] 267-482-4364
-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com
To unsubscribe from this list, manage your profile @ http://
www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------
-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------