Jump to content

Search the Community

Showing results for tags 'ex'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. So i have this string that i am trying to split up into an array. {"q1":{"a2":[0,1],"a5":[0,0],"a3":[0,1],"a4":[0,0],"a1":[1,0]},"q2":{"a1":[1,1],"a2":[0,1]},"q3":{"a2":[1,0],"a4":[0,0],"a5":[0,0],"a3":[0,0],"a1":[0,1]},"q4":{"a2":[1,1],"a4":[0,1],"a1":[0,0],"a5":[0,1],"a3":0,0]},"q5":{"a1":[1,1],"a5":[0,1],"a4":[0,0],"a3":[0,0],"a2":[0,0]},"q6":{"a1":[1,1],"a4":[0,1],"a2":[0,1],"a3":[0,1]},"q7":{"a5":[1,0],"a3":[0,1],"a2":[0,1],"a1":[0,0],"a4":[0,1]},"q8":{"a3":[1,1],"a4":0,1],"a2":[0,1],"a1":[0,1]},"q9":{"a1":[1,0],"a2":[0,0]}}}} What i am trying to accomplish is build a RegExp that will output something very similar to this: $aArray[0] = "q1":{"a2":[0,1],"a5":[0,0],"a3":[0,1],"a4":[0,0],"a1":[1,0]}," $aArray[1] = "q2":{"a1":[1,1],"a2":[0,1]}, $aArray[3] = "q3":{"a2":[1,0],"a4":[0,0],"a5":[0,0],"a3":[0,0],"a1":[0,1]}, .... So you can see i pretty much want the StringRegExp to grab all of the information inbetween "q\d" Here is what i have done so far: #include <Array.au3> $hResults = FileOpen("Results.txt", 0) $sResults = FileRead($hResults) $aQuestions = StringRegExp($sResults, '"q\d{1,}.*', 3) ConsoleWrite(@error & @CRLF & @extended & @CRLF) _ArrayDisplay($aQuestions) The output i get is $aQuestions[0] with the entire string. I tried less greedy options for the '.' by adding ++ or +? but neither are working. Hopefully i explained it well enough. Any help is appreciated!
×
×
  • Create New...