Jump to content
Sign in to follow this  
Justmobile

StringRegExp

Recommended Posts

Justmobile

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

Share this post


Link to post
Share on other sites
WolfWorld

#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

Share this post


Link to post
Share on other sites
Justmobile

#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.

Share this post


Link to post
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
Sign in to follow this  

×