Jump to content
Sign in to follow this  

Getting data from source code with regex?

Recommended Posts


https://regex101.com/r/l4icdQ/2 :)

A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat



If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post

Link to post
Share on other sites
#include <Array.au3>
$sText = '{"us":473,"global":367},"rating":false}}])'
$a = StringRegExp($sText, ":(\d+)", 3)



Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post

Link to post
Share on other sites


Is there a way without the two for loop to take the figures of this pattern separately

$aAlexaglobalSource1 = StringRegExp($aAlexaSourceRead, '".*"global":(\d+)', 3)
$aAlexaCountryrankingSource2 = StringRegExp($aAlexaSourceRead, '":(\d+).*"global":', 3)
For $j = 0 To UBound($aAlexaglobalSource1) - 1
For $i = 0 To UBound($aAlexaCountryrankingSource2) - 1
GUICtrlSetData($aAlexaGlobalLabel, $aAlexaglobalSource1[$j])
GUICtrlSetData($aAlexaCountryrankingLabel, $aAlexaCountryrankingSource2[$i])


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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...