Jump to content

StringRegExp


Recommended Posts

Hi all,

im using code below, just from the help file, i read a rss feed and i want to show the titles

the feed title's i want to output these to the clipboard, i check all the topics in this forum

but cannot find it, $filen are the titles from the rss feed, how can i get these in the clipboard

i tried _ArraytoClip($avArray,1) e.t. but i do not understand how i can get the value's??

i i check with msgbox $i it's always 0, so $title[0] will hold the title's of the feed, but $title[1] give's a error.

please help

thanks

While 1

$title = StringRegExp($RSSFile, '<title>(.*?)</title>', 1, $nOffset)

If @error = 0 Then

$nOffset = @extended

Else

ExitLoop

EndIf

for $i = 0 to UBound($title) - 1

$filen = $title[$i]

Next

WEnd

Link to comment
Share on other sites

#include <Array.au3>

$aRssTitle = StringRegExp($sRssFile, '<title>(.*?)</title>', 3) 
_ArrayToClip($aRssTitle)

First of all $aRssTitle return an array already and _ArrayToClip process an array so there is no need to convert it.

Secondly there is a flag 3 which will return the Global match meaning that all match is returned.

*edit: explained

Edited by athiwatc
Link to comment
Share on other sites

#include <Array.au3>

$aRssTitle = StringRegExp($sRssFile, '<title>(.*?)</title>', 3) 
_ArrayToClip($aRssTitle)

First of all $aRssTitle return an array already and _ArrayToClip process an array so there is no need to convert it.

Secondly there is a flag 3 which will return the Global match meaning that all match is returned.

*edit: explained

Thank a Lot!!

Works great.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...