Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2008

Re: help with regular expressions

From Nick Wedd <nick@maproom.co.uk>
Newsgroups comp.lang.php
Subject Re: help with regular expressions
References <d0540b4f-c05b-43d0-bce7-f0fd8136f8a7@j13g2000pro.googlegroups.com>
Message-ID <_95Hp.582$29.124@newsfe08.ams2> (permalink)
Date 2011-06-06 15:06 +0100

Show all headers | View raw


On 04/06/2011 17:55, Innerlab wrote:
> Hello.  I'm trying to parse pages from wikipedia. Although I'm not
> that good with PHP,  such scripts are more available on the web than -
> lets say- ASP/ VBscript.
>
> I have a PHP script that returns links within wikipedia pages as:
>
> [[ Name_of_URL ]]
>
> So, with regex I must parse the above to construct links like:
>
> <a href="http://URL">Name_of_URL</a>
>
> I know the preg_replace( ) function is the one to use, but honestly, I
> cannot figure out what regex I must use.
>
> I'd appreciate any guidance on this matter.

Can you give an actual example of a string that you might want to 
process, and of what you want it converted to?

Nick
-- 
Nick Wedd
nick@maproom.co.uk

Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

help with regular expressions Innerlab <ewar007@gmail.com> - 2011-06-04 09:55 -0700
  Re: help with regular expressions Innerlab <ewar007@gmail.com> - 2011-06-04 10:01 -0700
  Re: help with regular expressions jeff <mung_me@att.net> - 2011-06-04 18:14 -0400
  Re: help with regular expressions Nick Wedd <nick@maproom.co.uk> - 2011-06-06 15:06 +0100

csiph-web