This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
darkrad
Voice
Posts: 16 Joined: Wed Sep 10, 2003 6:33 pm
Post
by darkrad » Wed Sep 10, 2003 6:38 pm
if $line var is :
<a href="/Sections/Genres/Sci-Fi/">Sci-Fi</a> / <a href="/Sections/Genres/Action/">Action</a> / <a
href="/Sections/Genres/Thriller/">Thriller</a> <a href="keywords">(more)</a>
and i try to :
[regexp -- {(?s)^.+>(.*)</a>$} $line - gen]
if i print $gen , the result is :
(more)
How do i fix this , to have $gen = Sci-Fi Action Thriller
?
thx for the support
strikelight
Owner
Posts: 708 Joined: Mon Oct 07, 2002 10:39 am
Contact:
Post
by strikelight » Fri Sep 12, 2003 3:08 am
darkrad wrote: if $line var is :
<a href="/Sections/Genres/Sci-Fi/">Sci-Fi</a> / <a href="/Sections/Genres/Action/">Action</a> / <a
href="/Sections/Genres/Thriller/">Thriller</a> <a href="keywords">(more)</a>
and i try to :
[regexp -- {(?s)^.+>(.*)</a>$} $line - gen]
if i print $gen , the result is :
(more)
How do i fix this , to have $gen = Sci-Fi Action Thriller
?
thx for the support
You'd be better off using regsub instead of regexp..
Code: Select all
regsub -all {(<[^>]*>)} $line "" gen
Should do the trick.. Of course, "(more)" will still be in it as well, but it shouldn't be hard for you to get rid of that.