Okay, I am not a regex expert by any means, but I am trying to do
something like this,
<@assign str "<@arg text>"
SCOPE="user">
<@assign expr "http?://[^ ]*" SCOPE="user">
<@regex str="@@str" expr="expr" type="e">
<@assign expr "http?://[^ ]*" SCOPE="user">
<@regex str="@@str" expr="expr" type="e">
but I keep getting a return of M regardless if I am typing
anything with http:// in it or not.
I think this is on the right track, just wondering where to go
from here...
Thanks!
On a more useful note that my previous:
<@assign request$str "visit http://www.google.com/modules/default.taf now">
<@assign request$expr "http?://[^ ]*">
<@regex str="@@request$str" expr="@@request$expr" type="e">
will return
http://www.google.com/modules/default.taf
Since the _expression_ is looking for the first space to terminate the url, it will include any punctuation (think url at end of sentence, the full stop will be included) and if the url spans multiple lines, the line returns will also be included.
J.
On 16/02/2005, at 11:39 PM, [EMAIL PROTECTED] wrote:
The challenge is to find the string that represents an URL, which beginswith http:// and ends with the first space after that.
WITH IMAGINATION
Planning, Implementation and Management of Web Applications
160 Pacific Highway North Sydney NSW Australia 2060
phone + 612 9929 9229 fax + 612 9460 4770
web - www.wi.com.au email - [EMAIL PROTECTED]
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf