Jump to content

Text Extraction / Regular Expressions Help


Ned
 Share

Recommended Posts

I have just started learning "Regular Expressions". I have read the help file on Regular Expressions and has helped a little. My ultimate goal of my script is the extract a link out of some source code from a web page and copy the link to the clipboard. The part I am stuck on is extracting the link. The information I know about the link is how it's start and end are static. The middle is dynamic and is based on each user. The length of the link varies user to user also but is around 350 - 450 characters long. There is only one link in the source code that starts and end with this static text.

Im not really sure where to go based off this script from the help file:

$sourcecode = Source code of page w/ link...

$asResult = StringRegExp($sourcecode, '(???)

If @error == 0 Then
    MsgBox(0, "Result", $asResult[0])
EndIf

Is there a tutorial or more help pages on how to make the pattern for what I am looking for?

Link to comment
Share on other sites

I'm reasonably certain you didn't copy that code from the help file.

If you post a couple of typical links then perhaps we can get you started in the right direction. The linnks should include everything from the <a tag to the </a> but you may change the dynamic portion to protect the possibly innocent.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

It is from the help file under tutorials.

The link is of the game app in myspace.

Here is the entire HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<!--GLOBAL--> 
<html xmlns="http://www.w3.org/1999/xhtml" class="noJS en-US"> 
<!-- AppCanvas --> 
<head><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 
<script type="text/javascript"> 
    //<![CDATA[
var MySpace = {};
var MySpaceRes = {};
MySpaceRes.AppManagement = {"UserAppPref_AddListValueButton":"Add","UserAppPref_CancelButton":"Cancel","UserAppPref_Link":"App Preferences","UserAppPref_SaveButton":"Save","UserAppPref_Heading":"{0} Preferences","AppsPopup_Loading":"Loading...","AppsPopupV2AddApp":"Add App","AppsPopupV2Close":"close","AppsPopupV2ToolTip":"Your basic information includes your display name and display photo.","RequestPermissionV2Deny":"Deny","RequestPermissionV2AllowPermission":"Allow Permission","RequestPermissionV2PopupTitle":"App Permissions Request","RequestPermissionHeader":"Permission Request","RequestPermissionUpdate":"Update","RequestPermissionCancel":"Cancel","RequestPermissionIntro":"{0} is requesting the following:"};
MySpaceRes.ProfileDisplay = {"AppIsInstalled":"You already have this application","AppNotInstalled":"Add this application to your MySpace account","AppInstallButton":"Add this App","AppUninstallButton":"Remove this App","AppInstallFailed":"Oops, failed to add the application. Please try again.","AppUninstallFailed":"Oops, remove failed. Please try again.","AppInstallConfirm":"","AppUninstallConfirm":"Are you sure you want to remove this application?","AppInstallRedirect":"Application added! Taking you to the app...","AppInstallPopupButtonInstall":"Add","AppInstallPopupButtonCancel":"Cancel","AppInstallPopupButtonUninstall":"Remove","AppInstallHeader":"Add ","AppInstallUninstallHeader":"Remove?"};
MySpaceRes.Common = {"Yes":"Yes","No":"No","Ok":"Ok","Attention":"Attention"};
MySpaceRes.Header = {"Cancel":"Cancel / CancelaciĆ³n","Continue":"Continue / Continuar"};
MySpace.ClientContext = {"UserId":470792517,"DisplayFriendId":437993929,"IsLoggedIn":true,"FunctionalContext":"AppCanvas","UserType":1};
 
    MySpace.StaticContentBase='http://x.myspacecdn.com';
    
MySpace.ClientMaintenanceConfigs = {"asyncphotobrowsecaching":0,"msplinksconvertall":0,"photocommentsajax":0,"inf_ind_newvideocomment":0,"musicjv_amazoninplace":0,"enablevideocategorydropdown":0,"applications_userapppreferences":0,"inf_ind_unreadim":0,"webimtestclient":0,"applications_showafterloaduhp":0,"applications_showafterloadprofiles":0,"applications_enablev2settingspopup":0,"musicjv_allmyplaylists":0,"inf_ind_newclassified":0,"webimcoldfusion":0,"webimclientrichtexteditor":0,"mdpcontaineruseopencanvas":0,"inf_ind_newautotag":0,"applications_enableopenidpopuphandling":0,"applications_removeonappprofile":0,"friendselectorinstatusmooddialog":0,"musicjv_debug":0,"photoquickpostmessaging":0,"mdp_enable_homeappnavdragdrop":0,"musicjv_stoprefresh_medrec":0,"mystuffautos":0,"mystuffreportabusepost":0,"dwbeaconmusicsearch":0,"mystuffuploadphotos":0,"dwbeaconclientv2":0,"mdpactivitiesautopublish":0,"dwbeaconpymk":0,"dwbeaconmailv2":0,"mdp_rpcsetauthtoken":0,"mmt_usebigpipeuniveralid":0,"mystuff_userestfulurls":0,"customerrorpageenabled":0,"dwbeaconmusicbuybutton":0,"applications_optimizeinstallcallback":0,"signup_addrecommendationv2_deafultselectall":0};
MySpace.ClientIntMaintenanceConfigs = {};
//]]>
</script><title> 
    Overdrive by Playdom on MySpace Apps
</title> 
    <script type="text/javascript">document.documentElement.className = document.documentElement.className.replace(/noJS/, 'hasJS');</script> 
    
 
    <!--MainXHTML--> 
    
    <meta name="keywords" content="friends networking sharing photos finding friends blogs journals blogging journaling bands music rate pics join groups forums classifieds online social networking"></meta> 
    <meta http-equiv="expires" content="0" /> 
    <meta http-equiv="Pragma" content="no-cache" /> 
    
    
    
 
 
<script type="text/javascript"> 
    MySpace.Ads = {};
MySpace.Ads.Account = {"Type":"16"};
 
</script> 
<script type="text/javascript"> 
    MySpace.Header = {}; MySpace.Header.IsTrueGlobalHeaderEnabled = true; MySpace.Header.Navigation = {};MySpace.Header.Navigation.OnAfterRender = function(){};
</script><script type="text/javascript" src="http://cms.myspacecdn.com/cms/js/ad_wrapper0144.js"></script> 
<script type="text/javascript" src="http://js.myspacecdn.com/modules/common/static/js/myspace_nc-_ehe8.js"></script> 
<script type="text/javascript" src="http://js.myspacecdn.com/modules/applications/static/js/rpccore_cwkb48zq.js"></script> 
<script type="text/javascript" src="http://js.myspacecdn.com/modules/applications/static/js/appscore_ehjpoesk.js"></script> 
 
<script type="text/javascript"> 
    var ifpc_current_surface = "canvas"; var ifpc_canvas_urltemplate = "http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId={0}&friendId={1}&appParams={2}"; var ifpc_profile_urltemplate = "http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&appId={0}&friendId={1}&appParams={2}"; var ifpc_home_urltemplate = "http://home.myspace.com/index.cfm?fuseaction=user&appId={0}&friendId={1}&appParams={2}"; var ifpc_supported_postto_targets = ['COMMENTS','BLOG','BULLETINS','PROFILE','SEND_MESSAGE','SHARE_APP','ACTIVITY']; var ifpc_locale = {country: "US", lang: "en"}; var ifpc_ownerid = 470792517; 
</script> 
<script type="text/javascript"> 
    MySpace.MDP.Apps.setViewerAppsResource("http://api.myspace.com/v1/users/470792517/applications.jsnp?token=eFXChaM84p%2but45qe8yfi7YCTYM%3d");
</script> 
<script type="text/javascript"> 
    
</script> 
<link rel="stylesheet" type="text/css" href="http://x.myspacecdn.com/modules/common/static/css/global_5dchok8z.css" /> 
<link rel="stylesheet" type="text/css" href="http://x.myspacecdn.com/modules/applications/static/css/appsdisplay_hcg1y8ym.css" /> 
 
<style type="text/css"> 
 
 
    #canvasPageTitle {float:left; padding:4px 0; width: 570px;}
    #topLinks {padding:15px 10px 10px;}
    div#pageLinks {margin:8px 5px 0 0; color:#039;}
    #canvasPageTitle>a, #pageLinks>a{ font-weight: bold; }
    #applicationTitle { margin: 0 4px; font-size: 15px; font-weight: bold;}
    .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
    .clearfix{.height:1%;}
    .right{float:right;}
    .preferenceListItemRemove { margin-left: 5px; margin-right: 10px; color: #6698CB; cursor: pointer; } 
 
#footer{ padding-bottom: 27px;}
</style> 
</head> 
<body> 
   
    
        <div id="wrap" class="wrap"> 
 
        <!-- BOH Standard --> 
<iframe id="imConsoleContainer" class="mimContainer " frameborder="0" scrolling="no" allowtransparency="true" src="/Modules/WebIM/Pages/ConsoleTabsFrame.aspx?consoleState=DEFAULT&friendCount=21&presence=0&IPCulture=en-US&PreferredCulture=en-US&v=6&indicator=" style="position:fixed;bottom:0px;left:0px;width:100%;"></iframe><iframe id="settingsTabContainer" class="mimContainer " frameborder="0" scrolling="no" allowtransparency="true" src="/Modules/WebIM/Pages/ConsoleSettingsFrame.aspx?consoleState=DEFAULT&friendCount=21&presence=0&IPCulture=en-US&PreferredCulture=en-US&useragent=Mozilla%252f5.0%2b(Windows%253b%2bU%253b%2bWindows%2bNT%2b6.1%253b%2ben-US)%2bAppleWebKit%252f532.0%2b(KHTML%252c%2blike%2bGecko)%2bChrome%252f3.0.195.33%2bSafari%252f532.0&v=6&indicator=" style="position:fixed;bottom:0px;right:0px;width:75px;"></iframe><script type="text/javascript"></script><div id="header" class="clearfix globalWidth"><div id="leaderboard" class="clearfix globalLeaderboard"><div id="tkn_leaderboardDiv" style="height:90px;" align="center" ><div id="tkn_leaderboard"></div><script type="text/javascript"> 
sdc_wrapper_refresh("tkn_leaderboard", "/MySpaceApps/AppCanvas,45000012", "Frame1", 60);</script> 
</div></div><div id="googlebar" class="clearfix"><h2 id="mslogo" class="global"><a id="mshomelink" href="http://www.myspace.com/" title="MySpace" style="background-image:url(http://cms.myspacecdn.com/cms/Headerlogo/header_ms.png);"><strong>MySpace</strong>&nbsp;<em>a place for friends</em></a></h2> 
<div id="searchContainer_Header" class="global"><form id="formSearch_Header" name="srch_Header" onsubmit="return msglobalnav.srchSubmit('search_q_Header')" action="http://searchservice.myspace.com/index.cfm?" method="get" style="padding:0;margin:0;"><input type="hidden" id="fuseaction_Header" name="fuseaction" value="sitesearch.results" /><input type="hidden" id="orig_search_Header" name="orig" value="search_Header" /><input type="hidden" id="origpfc_search_Header" name="origpfc" value="AppCanvas" /><input type="hidden" id="search_t_Header" name="type" value="People" /><div class="srchfieldLayer"><div><div><input name="qry" id="search_q_Header" maxlength="100" class="srchTextfld" type="text" value="" /><div id="srchMenuContainer"><span class="loc2"><a id="searchTypeValue_Header" style="text-decoration:none !important;" onclick="msglobalnav.openSearchTypes('Header');" onmouseout="msglobalnav.hideSearchTypes('Header');">People<small>ā–¼</small></a></span><div id="srchMenuListBox_Header" onmouseover="msglobalnav.srchMenuList(true,'Header');" onmouseout="msglobalnav.srchMenuList(false,'Header');"><ul><li><a id="People_Header" href="javascript:msglobalnav.switchSearchTypeTo('People','Header')">People</a></li><li><a id="AllMySpace_Header" href="javascript:msglobalnav.switchSearchTypeTo('AllMySpace','Header')">MySpace</a></li><li><a id="Web_Header" href="javascript:msglobalnav.switchSearchTypeTo('Web','Header')">Web</a></li><li><a id="Music_Header" href="javascript:msglobalnav.switchSearchTypeTo('Music','Header')">Music</a></li><li><a id="MySpaceTV_Header" href="javascript:msglobalnav.switchSearchTypeTo('MySpaceTV','Header')">Video</a></li><li><a id="Local_Header" href="javascript:msglobalnav.switchSearchTypeTo('Local','Header')">Local</a></li><li><a id="Images_Header" href="javascript:msglobalnav.switchSearchTypeTo('Images','Header')">Images</a></li></ul><iframe id="searchFramerHeader"></iframe></div></div></div></div></div><div class="srchButton"><div><input type="submit" name="submit" value="Search" id="submit_Header" /></div></div><div id="googleLogo_Header"><span>Powered by Google
</span></div></form></div></div> 
 
<!-- _Nav: N:Global_TrueGlobalV2 V:All, LoggedIn G:89321_20091109.2 F:null M:TrueGlobal--> 
 
<div id="topnav" class="clearfix"><ul id="leftNav"><li id="nav1000000"><a href="http://home.myspace.com/index.cfm?fuseaction=user">Home</a></li><li class="dropDown" id="nav1000002"><a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.center&check=1">Mail <span id='mailCounttotal' class='mailCountNav totalCountNav'>(491)</span>&nbsp;<small>ā–¼</small></a><ul class="subMenu"><li><a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.inbox">Inbox <span id='mailCountinbox' class='mailCountNav inboxCountNav'>(491)</span></a></li><li><a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.notifications&type=notifications&group=0">Notifications</a></li><li><a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.compose">Compose</a></li><li><a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.friendRequests">Friend Requests </a></li><li><a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.sentbox">Sent Mail</a></li><li><a href="http://messaging.myspace.com/index.cfm?fuseaction=mail.savebox">Saved Mail</a></li><li class="last"><a href="http://messaging.myspace.com/index.cfm?fuseaction=adb">Address Book</a></li></ul><iframe></iframe></li><li class="dropDown" id="nav1000010"><a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=470792517">Profile&nbsp;<small>ā–¼</small></a><ul class="subMenu"><li><a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=470792517">My Profile</a></li><li><a href="http://profileedit.myspace.com/index.cfm?fuseaction=profile.interests">Edit Profile</a></li><li><a href="http://profileedit.myspace.com/index.cfm?fuseaction=profile.upgradeprofile">Customize Profile</a></li><li><a href="http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.applicationSettings">My Apps</a></li><li><a href="http://blog.myspace.com/index.cfm?fuseaction=blog.ListAll&friendID=470792517">My Blog</a></li><li><a href="http://comment.myspace.com/index.cfm?fuseaction=user.viewComments&friendID=470792517">My Comments</a></li><li><a href="http://profileedit.myspace.com/index.cfm?fuseaction=user.favorites">My Favorites</a></li><li><a href="http://viewmorepics.myspace.com/index.cfm?fuseaction=user.viewAlbums&friendID=470792517">My Photos</a></li><li><a href="http://music.myspace.com/index.cfm?fuseaction=music.singleplaylist&friendid=470792517">My Playlists</a></li><li class="last"><a href="http://vids.myspace.com/index.cfm?fuseaction=vids.myvideos">My Videos</a></li></ul><iframe></iframe></li><li class="dropDown" id="nav1000021"><a href="http://friends.myspace.com/index.cfm?fuseaction=user.viewfriends&friendID=470792517">Friends&nbsp;<small>ā–¼</small></a><ul class="subMenu"><li><a href="http://friends.myspace.com/index.cfm?fuseaction=user.viewfriends&friendID=470792517">My Friends</a></li><li><a href="http://friends.myspace.com/index.cfm?fuseaction=user.viewfriends&friendID=470792517&view=online">Online Friends</a></li><li><a href="http://activities.myspace.com/index.cfm?fuseaction=friendupdates.home">Activity Stream</a></li><li><a href="http://friends.myspace.com/index.cfm?fuseaction=profile.friendmoods">Status and Mood</a></li><li><a href="http://bulletins.myspace.com/index.cfm?fuseaction=bulletin">Bulletins</a></li><li><a href="http://browseusers.myspace.com/Browse/Browse.aspx">Browse People</a></li><li><a href="http://searchservice.myspace.com/index.cfm?fuseaction=sitesearch.friendfinder">Find Friends</a></li><li><a href="http://invites.myspace.com/index.cfm?fuseaction=invite.abinvite">Invite Friends</a></li><li class="last"><a href="http://www.myspace.com/index.cfm?fuseaction=PeopleYouMayKnow">People You May Know</a></li></ul><iframe></iframe></li><li id="nav1000034"><a href="http://music.myspace.com/">Music</a></li><li id="nav1000035"><a href="http://vids.myspace.com/">Video</a></li><li id="nav1000036"><a href="http://apps.myspace.com/Modules/AppGallery/Pages/index.aspx?category=7&st=totalinstalls">Games</a></li><li class="dropDown" id="nav1999999"><a href="http://www.myspace.com/index.cfm?fuseaction=splash.more">More&nbsp;<small>ā–¼</small></a><ul class="subMenu"><li class="divider"><a href="http://www.myspace.com/index.cfm?fuseaction=splash.more">More on MySpace</a></li><li><a href="http://apps.myspace.com/index.cfm?fuseaction=apps">Apps Gallery</a></li><li><a href="http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=119211">Events</a></li><li><a href="http://forums.myspace.com/">Forums</a></li><li><a href="http://groups.myspace.com/index.cfm?fuseaction=groups.categories">Groups</a></li><li><a href="http://local.myspace.com/">Local</a></li><li><a href="http://www.myspace.com/myspaceid">MySpaceID Sites</a></li><li><a href="http://collect.myspace.com/index.cfm?fuseaction=schools.main">Schools</a></li><li class="divider"><a href="http://blog.myspace.com/">Top Blogs</a></li><li><a href="http://www.myspace.com/aplaceforim">IM</a></li><li class="divider"><a href="http://www.myspace.com/myspacemobile">Mobile</a></li><li><a href="http://celebrity.myspace.com/index.cfm?fuseaction=celebrity">Celebrity</a></li><li><a href="http://comedy.myspace.com/">Comedy</a></li><li class="last"><a href="http://ksolo.myspace.com/">Karaoke</a></li></ul><iframe></iframe></li></ul><ul id="rightNav"><li id="nav4000063"><a href="http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.contactInfo">My Account</a></li><li id="nav4000064"><a href="http://www.myspace.com/index.cfm?fuseaction=signout">Sign Out</a></li></ul></div> 
</div> 
<noscript> 
<div> 
<div style="padding: 4px 0; margin: 0 auto; width: 960px; font-weight: bold; background-color: #FC9; color: #D95801; text-align: center;">Having trouble? You need to have <a style="FONT-WEIGHT: bold; COLOR: #036" href= "http://www.myspace.com/javascriptissues" target="_blank">Javascript enabled</a> 
                    to use all of MySpace's features. <a style="FONT-WEIGHT: bold; COLOR: #036" href= "http://www.myspace.com/javascriptissues" target="_blank">Click here</a> 
                    for help enabling it.</div></div> 
</noscript><!-- EOH --> 
 
        <div id="msSubnav" class="group applications"><h1><a title="apps" href="http://apps.myspace.com/Modules/AppGallery/Pages/index.aspx">apps</a></h1><ul class="nav"><li><a href="http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.applicationSettings"><span>View My Apps</span><small>ā–²</small></a></li></ul></div> 
    
 
   <form name="aspnetForm" method="post" action="/Modules/Applications/Pages/Canvas.aspx?appId=123192" id="aspnetForm"> 
<div> 
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUIMjQxMjcyMzNkZA==" /> 
</div> 
 
 
<script type="text/javascript"> 
//<![CDATA[
var FIM_advAppId = 123192;var FIM_baseAdvId = null;//]]>
</script> 
 
    
    <div id="wrap"> 
        
<!-- CMS Include ---> 
 
    <div id="GAB_Control_A"></div> 
     
 
    <div id="topLinks" class="clearfix"> 
        
            <div id="canvasPageTitle"> 
                <img alt="Application Icon" style="vertical-align: bottom;" src="http://c1.ac-images.myspacecdn.com/images02/30/l_3c10d552cba84ec78c53da8396c9a680.gif" /><span

                    id="applicationTitle">Overdrive</span> &nbsp;-&nbsp;<a href="http://www.myspace.com/437993929"

                        title="Overdrive App Profile">More Info</a>&nbsp;|&nbsp;<a

                            href="http://profile.myspace.com/Modules/Applications/Pages/ReportApp.aspx?appId=123192">Report a Problem</a> 
            </div> 
        
    </div> 
 
 
    
    
<script type="text/javascript"> 
    
        if(top != self) top.location = location;
    
</script> 
   
    
    <iframe id="apppanel_123192_canvas" name="apppanel_123192_canvas" src="http://api.msappspace.com/apprendering/123192/canvas/06182009021613/1_0_0/render.app#IobXToiD3%2bSQd41abBYVPpc%2b4UFi0XjD6c2Sv%2boSTzmdaDtIslSzjuKwbrNvqRuR21DtRmpOTVXyXKGU%2fIGCkcYUhr6Z1twIgfBEg%2ftqiPQ%3d&opensocial_surface=canvas&perm=%5b%22DP%22%2c%22UT%22%2c%22UF%22%2c%22RN%22%2c%22PB%22%2c%22SN%22%2c%22%22%2c%22BI%22%2c%22FL%22%5d&ownerId=470792517&viewerId=470792517&installState=1&country=us&lang=en&mc=UOC" width="100%" height="6000" scrolling="no" frameborder="0" allowtransparency="true" style="border: none; background:transparent;"></iframe><br /> 
        
        <script type="text/javascript"> 
           var MySpaceAppProfileContext = { appId: "123192" , token: "7s2qf1xhQJIC3cI00znR1HhnZxEKoEMA0ViQvkma5C7cXwqhCK0BrUN7e9LEkLtA%2bvslMopZ1a1WER9%2fR4%2fAi3lRmXreRdR6HhDl%2bGTolVw%3d", loginUrl: "http://www.myspace.com/index.cfm?fuseaction=splash&next=http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=123192&api_key=C50CF2B2-B4E3-420a-9839-7966192982A1", appDisplayName: "Overdrive" };            
        </script> 
        
        
    
    
    
    
    <div id="GAB_Control_Default"></div> 
    <script type="text/javascript"> 
function resizeIframe(gadFrame,controlId){
        try{
         if (gadFrame){
        var doc;
        if(gadFrame.contentDocument) 
            doc = gadFrame.contentDocument; 
        else if(gadFrame.contentWindow)  
            doc = gadFrame.contentwindow.document;  
         else if(gadFrame.document)  
            doc = gadFrame.document;  
        if (doc)
        {
            if (Sys.Browser.name == "Safari") {
                            var contentHeight = doc.getElementById(controlId).offsetHeight + 13;
                            
                            if (contentHeight <= 150)
                                contentHeight = 180;
 
$get(controlId).style.height = contentHeight + 'px';
            }           
            else $get(controlId).style.height = (doc.body.scrollHeight + 13) + 'px';
        }
        }
        }catch(e){}
        }
</script> 
<script type="text/javascript"> 
$get("GAB_Control_Default").innerHTML = '<iframe id="gadIframe" onload="resizeIframe(this,\'GAB_Control_Default\');" src="/Modules/Common/HttpHandlers/GoogleAd.ashx?placement=myspace_apps_canvas_ab&appId=123192&controlids=GAB_Control_Default,GAB_Control_A" width="100%" height="100%" scrolling="no" frameborder="0"></iframe>';</script> 
 
 
 
        <div style="clear: both; height: 10px;"> 
        </div> 
    </div> 
 
</form> 
   
    
        <!-- Footer:Standard Start --> 
<style> 
div#googleLogo_Footer{
height:24px !important;
}
</style> 
 
<div id="footer"><br /> 
<a class="text" href="http://faq.myspace.com/app/home" target="_blank" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20955')">Help</a> | 
<a class="text" href="http://www.myspace.com/index.cfm?fuseaction=misc.terms" target="_blank" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20956')">Terms</a> | 
<a class="text" href="http://www.myspace.com/index.cfm?fuseaction=misc.privacy" target="_blank" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20957')">Privacy Policy</a> | 
<a class="text" href="http://www.myspace.com/index.cfm?fuseaction=cms.viewpage&amp;placement=safety_pagehome" target="_blank" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20958')">Safety Tips</a> |
<span class="disabled"><a class="text" href="http://www.myspace.com/index.cfm?fuseaction=help.reportabuse&amp;abusetype=profile&amp;ProfileContentID=" target="_blank" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','32537')">Report Abuse</a> |</span> 
<a class="text" href="https://advertise.myspace.com/login.html?adv=gf.1&pr=d3oatdQsvADw%2BazsdI%2Fi0A%3D%3D" target="_blank" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20959')">Advertise</a> | 
<a class="text" href="http://developer.myspace.com" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20960')">Developers</a> | 
<a class="text" id="intlLink" href="http://www.myspace.com/index.cfm?fuseaction=InternationalMap" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20961')">MySpace International  ā–¼</a> 
<span id="msLatino">| <a class="text" href="http://latino.myspace.com" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20962')">MySpace Latino</a></span><br/> 
<p> 
<a href="http://www.myspace.com/pressroom" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','32538')">Press Room</a> | 
<a href="http://music.myspace.com" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20963')">Music</a> | 
<a href="http://vids.myspace.com" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20964')">Video</a> | 
<a href="http://www.myspace.com/sitemap" onclick="MySpace.CMS.track('0a1ec07d-1116-4841-bdc6-02a34ab8e4ad','20968')">Sitemap</a> 
</p> 
 
<br /><br /><div class="clear">&copy;2003-2009 MySpace.com. All Rights Reserved.
 
</div><style type="text/css"><!--
 
#internationalLinks div.intlColumn { float: left; padding-left: 15px; width: 180px; overflow: hidden; text-overflow: ellipsis;}
 
--></style> 
<div id="internationalLinks" style="height: 485px; margin-top: -485px;"> 
<div class="closer"><a href="javascript:msglobalnav.toggleInternationalLinks();">Close</a></div> 
<div class="intlColumn"><div class="header">Americas</div> 
<ul class="bottomMargin"> 
 
<li><a href="http://ar.myspace.com/">Argentina</a></li> 
<li><a href="http://br.myspace.com/">Brazil</a></li> 
<li><a href="http://ca.myspace.com/">Canada </a></li> 
<li><a href="http://cf.myspace.com/">Canada (FranƧais)</a></li> 
<li><a href="http://la.myspace.com/">Latin America (EspaƱol)</a></li> 
<li><a href="http://mx.myspace.com/">Mexico</a></li> 
<li><a href="http://us.myspace.com/">United States (English)</a></li> 
<li><a href="http://latino.myspace.com/">United States (Latino)</a></li> 
</ul><div class="header">Asia Pacific</div> 
<ul><li><a href="http://au.myspace.com/">Australia</a></li> 
<li><a href="http://zh.myspace.com/">Chinese (Traditional)</a></li> 
<li><a href="http://in.myspace.com/">India</a></li> 
<li><a href="http://jp.myspace.com/">Japan</a></li> 
<li><a href="http://nz.myspace.com/">New Zealand</a></li> 
</ul></div> 
<div class="intlColumn"><div class="header">Europe</div> 
<ul><li><a href="http://at.myspace.com/">Austria</a></li> 
<li><a href="http://belgie.myspace.com/">Belgium (Nederlands)</a></li> 
<li><a href="http://belgique.myspace.com/">Belgium (FranƧais)</a></li> 
<li><a href="http://dk.myspace.com/">Denmark</a></li> 
<li><a href="http://fi.myspace.com/">Finland</a></li> 
<li><a href="http://fr.myspace.com/">France</a></li> 
<li><a href="http://de.myspace.com/">Germany</a></li> 
<li><a href="http://ie.myspace.com/">Ireland</a></li> 
<li><a href="http://it.myspace.com/">Italy</a></li> 
<li><a href="http://nl.myspace.com/">Netherlands</a></li> 
<li><a href="http://no.myspace.com/">Norway</a></li> 
<li><a href="http://pt.myspace.com/">Portugal</a></li> 
<li><a href="http://pl.myspace.com/">Poland</a></li> 
<li><a href="http://ru.myspace.com/">Russia</a></li> 
<li><a href="http://es.myspace.com/">Spain</a></li> 
<li><a href="http://se.myspace.com/">Sweden</a></li> 
<li><a href="http://schweiz.myspace.com/">Switzerland (Deutsch)</a></li> 
<li><a href="http://suisse.myspace.com/">Switzerland (FranƧais)</a></li> 
<li><a href="http://svizzera.myspace.com/">Switzerland (Italiano)</a></li> 
<li><a href="http://tr.myspace.com/">Turkey</a></li> 
<li><a href="http://uk.myspace.com/">UK</a></li> 
</ul></div></div> 
 
</div> 
<script type="text/javascript"> 
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script> 
<script type="text/javascript"> 
var pageTracker = _gat._getTracker("UA-6293770-1");
pageTracker._setDomainName(".myspace.com");
pageTracker._setSampleRate("1"); //sets sampling rate to 1 percent
pageTracker._trackPageview(); 
</script><!-- Footer:Standard End --> 
 
        </div> 
    
 
    
   
    
<script type="text/javascript" src="http://js.myspacecdn.com/modules/common/static/js/global_genujnfq.js"></script> 
 
    
 
<script type="text/javascript"> 
    
var WebIM = WebIM || {};
WebIM.Config = WebIM.Config || {};
WebIM.Config.WIMAPP_SERVER = "http://www.webim.myspace.com";
WebIM.Config.WIMAPP_REQUESTBASE = "http://webim.myspace.com";
WebIM.Config.genericFramePath = "/Modules/WebIM/Pages/ChatFrame.aspx?v=6";
WebIM.Config.reportAbuseURL = "http://webim.myspace.com/Modules/WebIM/Pages/ReportChatAbuse.aspx";
WebIM.Config.popoutWinUrl = "http://www.myspace.com/index.cfm?fuseaction=webim.popout";
WebIM.Config.profileURL = "http://profile.myspace.com/index.cfm?fuseaction=user.viewProfile&friendID={0}";
WebIM.Config.addCommentURL = "http://comment.myspace.com/index.cfm?fuseaction=user.viewProfile_commentForm&friendID={0}";
WebIM.Config.sendMailURL = "http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID={0}";
WebIM.Config.ifpcScriptURL = "http://js.myspacecdn.com/modules/common/static/js/apps/ifpc003_n9jqdoon.js"; 
WebIM.Config.jsonScriptURL = "http://js.myspacecdn.com/modules/common/static/js/apps/json001_efvnfepv.js";
WebIM.Config.sendingImageURL = "http://x.myspacecdn.com/modules/common/static/img/loadercircles-15.gif";
WebIM.Config.sponsorFrameURL = "/Modules/WebIM/Pages/SponsorFrame.aspx?v=1";
WebIM.Config.blockUsersURL = "http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.blockedUsers";
WebIM.Config.dotNetBaseURL = "http://www.myspace.com";
WebIM.Config.addToFriendsURL = "http://friends.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendId={0}";
WebIM.Config.editFriendsURL = "http://friends.myspace.com/index.cfm?fuseaction=user.manageimfriends";
WebIM.Config.pendingRequestsURL = "http://messaging.myspace.com/index.cfm?fuseaction=mail.pendingFriendRequests";
WebIM.Config.ifpcRelayPath = "/Modules/WebIM/Pages/IFPCRelay.aspx";
WebIM.Config.helpURL = "http://www.myspace.com/aplaceforim";
WebIM.Config.WebIMSettingsURL = "http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.webIM";
WebIM.Config.popSoundURL = "http://x.myspacecdn.com/modules/webim/static/audio/pop.mp3";
WebIM.Config.soundPlayerURL = "http://x.myspacecdn.com/modules/webim/static/swf/soundplayer.swf";
WebIM.Config.incomingSoundURL = "http://x.myspacecdn.com/modules/webim/static/audio/incoming.mp3";
WebIM.Config.maxConsoleConversations = 30;
WebIM.Config.presencePollInterval = 60;
WebIM.Config.maxMessageSize = 1000;
WebIM.Config.eventsRequestMaxRetries = 3;
WebIM.Config.eventsRequestDelta = 3;
WebIM.Config.defaultIdleTime = 5;
WebIM.Config.minIdleTime = 1;
WebIM.Config.maxIdleTime = 100;
WebIM.Config.SEND_MESSAGE_DELAY_MILLISECONDS = 1000;
WebIM.Config.MAX_FRIEND_DISPLAY_COUNT = 400;
WebIM.Config.CONV_FRAME_URL = "/Modules/WebIM/Pages/Conversation.aspx?v=6";
WebIM.Config.CONSOLE_SETTINGS_FRAME_URL = "/Modules/WebIM/Pages/ConsoleSettingsFrame.aspx?v=6";
WebIM.Config.CONSOLE_TABS_FRAME_URL = "/Modules/WebIM/Pages/ConsoleTabsFrame.aspx?v=6";
WebIM.Config.SETTINGS_POPUP_FRAME_URL = "/Modules/WebIM/Pages/SettingsPopup.aspx?IPCulture=en-US&PreferredCulture=en-US&useragent=Mozilla%252f5.0%2b(Windows%253b%2bU%253b%2bWindows%2bNT%2b6.1%253b%2ben-US)%2bAppleWebKit%252f532.0%2b(KHTML%252c%2blike%2bGecko)%2bChrome%252f3.0.195.33%2bSafari%252f532.0&v=6";
WebIM.Config.FRIENDS_LIST_FRAME_URL = "/Modules/WebIM/Pages/FriendsList.aspx?IPCulture=en-US&PreferredCulture=en-US&useragent=Mozilla%252f5.0%2b(Windows%253b%2bU%253b%2bWindows%2bNT%2b6.1%253b%2ben-US)%2bAppleWebKit%252f532.0%2b(KHTML%252c%2blike%2bGecko)%2bChrome%252f3.0.195.33%2bSafari%252f532.0&v=6";
WebIM.Config.INDICATORS_POPUP_FRAME_URL = "/Modules/WebIM/Pages/IndicatorsPopup.aspx?IPCulture=en-US&PreferredCulture=en-US&useragent=Mozilla%252f5.0%2b(Windows%253b%2bU%253b%2bWindows%2bNT%2b6.1%253b%2ben-US)%2bAppleWebKit%252f532.0%2b(KHTML%252c%2blike%2bGecko)%2bChrome%252f3.0.195.33%2bSafari%252f532.0&v=6";
WebIM.Config.transparentImageURL = "http://x.myspacecdn.com/modules/common/static/img/spacer.gif";
WebIM.Config.displayTimestampDelayInSeconds = 60;
WebIM.Config.wimappServerName = "";
WebIM.Config.staticImageRoot = "http://x.myspacecdn.com/modules/webim/static/img/";
WebIM.Config.friendMoodsV2URL = "http://friends.myspace.com/index.cfm?fuseaction=profile.friendmoods&friendID={0}";
WebIM.Config.MIM_AJAX_HTML_URI = "http://www.webim.myspace.com/Modules/WebIM/Pages/mim_ajax.html?v=2";WebIM.Config.Security = {pageHash: "MIGvBgorBgEEAYI3WAO0oIGgMIGdBgorBgEEAYI3WAMBoIGOMIGLAgMCAAECAmYDAgIAwAQIh5bcKnOaGxAEEP3dlkPfB6XdB3y9vPPzP5MEYI7jn%2bcFAIRokMClIOn6uWj%2bg1DSL4haXJ33AfvJNv%2bOcOmC7%2b%2f53%2bZ%2flgTnlDvFO9sGsiHB0dBGra52KIQlqCJbohtr9xuQj%2f2JkJZqTpDH4JNlA8LUc8fkJP63dpmZvQ%3d%3d", header: "WebImHash"};WebIM.Config.genConsoleFromS = true;WebIM.Config.showStatusMoods = true;
</script> 
<script type="text/javascript"> 
    WebIM.ViewerJSON = {id: 470792517,
 imageUrl: "http://c3.ac-images.myspacecdn.com/images02/76/s_c05a5c8b0da04b7e8c9dff29bf22a7ae.png",
 name: "RP Bots",
 group: "Transient",
 realName: 1,
 presence: "Online",
 age: 20};
;
</script><script type="text/javascript" src="http://js.myspacecdn.com/modules/common/static/js/popupwithoverlay_wzym-x1l.js"></script> 
<script type="text/javascript" src="http://js.myspacecdn.com/modules/applications/static/js/canvascore_13bkluhh.js"></script> 
<script type="text/javascript" src="http://www.myspace.com/Modules/WebIM/Pages/ClientStrings.aspx/en-US/4"></script> 
<script type="text/javascript" src="http://js.myspacecdn.com/modules/webim/static/js/webimconsole_ueoa4cgp.js"></script> 
 
<script type="text/javascript"> 
            
            function canvas_checkNewInstall() {
                if(window.location.search.match(/newinstall=1/i) != null) {
                    MySpace.Apps.tryFIMAdvCallback(); 
                    MySpace.Apps.tryInstallCallback();  
                }  
            }
            Sys.Application.add_init( function() {canvas_checkNewInstall();});
        
</script> 
<script type="text/javascript"> 
    MySpace.BeaconType = "image";
MySpace.BeaconData={"dsid":"2","dsv":"1","rd":"home.myspace.com","rqs":"fuseaction=user","refpg":"/index.cfm","rpf":"User","d":"profile.myspace.com","qs":"appId=123192","pf":"AppCanvas","fa":"","pgnm":"--__--Applications--__--Canvas.aspx","cip":"413161974","pc":"en-US","pid":"-6002491944911711406","pidf":"0","ABtd":"0","t":"1258427438569","ct":"1258427438569","ci":"New Port Richey","st":"FL","co":"US","dmac":"539","uff":"0","uatv":"br=Chrome 3.0.195.33&os=Windows NT 6.1","sip":"170661088","uid":"470792517","pggd":"d7bf2433-cd69-4b84-ba59-67370126c88a","prid":"437993929","ili":"1","at":"16","cfv":"0:0:0","cef":"0","sliu":"0","pref":"0","kvp":"bt=2&"}
MySpace.BeaconAddress="http://b.myspace.com/~myspace/beacon/b.ashx?";
if (MySpace.Beacon) MySpace.Beacon.SendPageBeacon();
 
</script> 
<script type="text/javascript"> 
    var MySpaceClientContext = {"UserId":470792517,"DisplayFriendId":437993929,"IsLoggedIn":true,"FunctionalContext":"AppCanvas","UserType":1};
MySpaceClientContext.PreferredCulture = 'en-US';
</script> 
<script type="text/javascript"> 
    var VideoDefaultText='Find a TV show, music video or clip';
var MusicDefaultText='Find a favorite artist, song or album';
var ImagesDefaultText='Find images on MySpace';
var LocalDefaultText='Find restaurants and bars';
var intKeyRebrandHeader=true;
ORANGESearchBox =  $create(MySpace.UI.DefaultTextboxBehavior, {
defaultValue: ""
},
null, null, $get("search_q_Header"));
 
</script> 
<script type="text/javascript"> 
    
</script> 
   
   
   
   
   <script type="text/javascript">MySpace.Application._raiseDOMloaded();</script> 
</body> 
</html>

Here is the link it needs to get: (Only need the "HTTP://api.myspace.com/" .... to the "=UOC"

<iframe id="apppanel_123192_canvas" name="apppanel_123192_canvas" src="http://api.msappspace.com/apprendering/123192/canvas/06182009021613/1_0_0/render.app#IobXToiD3%2bSQd41abBYVPpc%2b4UFi0XjD6c2Sv%2boSTzmdaDtIslSzjuKwbrNvqRuR21DtRmpOTVXyXKGU%2fIGCkcYUhr6Z1twIgfBEg%2ftqiPQ%3d&opensocial_surface=canvas&perm=%5b%22DP%22%2c%22UT%22%2c%22UF%22%2c%22RN%22%2c%22PB%22%2c%22SN%22%2c%22%22%2c%22BI%22%2c%22FL%22%5d&ownerId=470792517&viewerId=470792517&installState=1&country=us&lang=en&mc=UOC" width="100%" height="6000" scrolling="no" frameborder="0" allowtransparency="true" style="border: none; background:transparent;"></iframe><br />
Link to comment
Share on other sites

Try this

$sSrc = "whatever method you are using to get the page source"
$aSRE = StringRegExp($sSrc, "(?i)id=\x22apppanel_123192_canvas.+src=\x22(http:.+?)\x22", 1)
If NOT @Error Then
    MsgBox(4096, "Result", $aSRE[0])
EndIf

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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