Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 14:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Brauche bitte Hilfe bei StringRegExp

Discussion on Brauche bitte Hilfe bei StringRegExp within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
emil's Avatar
 
elite*gold: 520
Join Date: Aug 2006
Posts: 65
Received Thanks: 5
Brauche bitte Hilfe bei StringRegExp

Hallo, ich bräuchte bitte Hilfe bei einen String auslesen:

so sieht der Heder so aus, was $sRecv ausgibt :

Code:
HTTP/1.1 200 OK
Server: nginx/1.4.1
Date: Tue, 27 Aug 2013 11:05:57 GMT
Content-Type: application/json
Connection: keep-alive
X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2 Java/Oracle Corporation/1.7)
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
Access-Control-Allow-Headers: content-type,accept,origin,authorization
P3P: CP='CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR'
Content-Length: 329

{"gameClientLink":"http://belize3.de.battleofcrowns.com/gameserver/game.jsp?user=GmoLaq%2FNppeBvAGWo5DcD11hAkIoUuKMw5b%2Fvu%2F51IW86mOvEoCwu69rBGGd5taJaDE9pEjpBw51pNR%2BWHotNpGB5lQtBQq%2FFt%2BXv9R4p10NkLMOcg42AWrFqYXBss9vkN4gGApMfX10Rfx3%2FtbPWa%2FHKg4DUWKNECP8uUSjHlTCxicHngTvYmJeCHS79kGOUUbUjjb%2FbJbQo9bHUJP5VflRqfsbjQ%3D%3D"}
und ich brauche das ab user= bis %3D%3D"}

aber irgendwie will er mir nichts ausgeben, habe es so versucht:

$Si = StringRegExp($sRecv , '/gameserver/game.jsp?user=(.+?)%3D%3D', 3) ; Gamelink wird ausgelesen
If IsArray($Si) Then
MsgBox(0, "Gamelink", ($Si[0]) ; nur zum Testen

vielen Dank schonmal
emil is offline  
Old 08/27/2013, 14:15   #2
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Du hast vergessen das "?" zu maskieren.

Richtig wäre:
Code:
'/gameserver/game.jsp\?user=(.+?)%3D%3D'
KDeluxe is offline  
Thanks
1 User
Old 08/28/2013, 15:01   #3
 
emil's Avatar
 
elite*gold: 520
Join Date: Aug 2006
Posts: 65
Received Thanks: 5
na da hab ich gleich noch etwas wo ich den fehler nicht finde, vielleicht kennt sich ja jemand aus:

Java/ HTML
Code:
<!DOCTYPE html>
<html style="overflow: hidden;"><head> … </head>
<body style="margin:0px; padding:0px; background-color: #067eb3; overflow:hidden;"> … </body>

</html>
ich brauch aus dem Script den Token:12b55cf0601171ebed2d127dcabb436a69fa7b
Code:
<!DOCTYPE html><html style="overflow: hidden;">
<head> … </head>
<body style="margin:0px; padding:0px; background-color: #067eb3; overflow:hidden;">
<noscript> … </noscript>
<script> … </script><script type="text/javascript">
      
		var CaribbeanColony = {
				gameserver: 'http://belize3.de.battleofcrowns.com/gameserver/',
				lobby: 'http://battleofcrowns.com/de',
				cdn: 'http://belize3.de.battleofcrowns.com/assets/',
				version: '0.7.3-RC1',
				region: '@REGION@',
				language: 'de',
				token: '12b55cf0601171ebed2d127dcabb436a69fa7b'
			};
	
    </script>
irgendwie komm ich mit $a = _StringBetween($sHTML, '<html style="overflow: hidden;" >' & @CRLF & ...... nicht recht weiter, entweder er bringt einen fahler oder gibt 0 aus

Danke schon mal
emil is offline  
Old 08/28/2013, 15:18   #4


 
Requi's Avatar
 
elite*gold: 3570
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,044
Received Thanks: 8,252
Code:
$aString = _StringBetween($sHTML, "token: '", "'")
Das vielleicht?
Requi is offline  
Thanks
1 User
Old 08/28/2013, 16:24   #5
 
emil's Avatar
 
elite*gold: 520
Join Date: Aug 2006
Posts: 65
Received Thanks: 5
Quote:
Originally Posted by Afropony View Post
Code:
$aString = _StringBetween($sHTML, "token: '", "'")
Das vielleicht?

lol Danke, irgendwie mach ich´s mir immer zu kompliziert
emil is offline  
Reply


Similar Threads Similar Threads
Bitte Bitte brauche Hilfe bei dem Object Map Editor von musicinstructor
10/10/2014 - Metin2 Private Server - 4 Replies
Hey Leute, Ich benutze den Map Editor von musicinstructor. Wenn ich die mapeditor.py einfüge und injecte passiert Ingame garnichts. Es steht nur im Chat Ingame Map-Editor by musicinstructor. Braucht man spezielle Rechte?? Oder was ist die Ursache?? Benutze Files von Daroo und den Clienten von ic3.
Brauche dringend hilfe bitte bitte gebe sogar was!!!!
04/06/2012 - Metin2 Private Server - 1 Replies
hallo leute als erstes mal , ich wollte gerade den daroo 1678 files entpacken ich drücke auf "Hier entpacken" dann kommt sofort eine fehlermeldung : WinRAR fehlermeldung serverfiles 1678-rc-b4.exe nicht öffnen bitte helft mir :( danke im vorraus C:\Users\akin\Desktop\Daroo\Serverfiles1678-RC-B4 .exe: Konnte C:\Users\akin\Desktop\Daroo\Serverfiles1678-RC-B4. exe nicht öffnen.
Server Problem bitte helft Leute bitte brauche eure hilfe sauu dringen
07/18/2011 - Metin2 Private Server - 20 Replies
Hi leute wenn man seinen server ya on bringt (ned das erste mal das ich ihn on bring) dann kommt am ende ya immer das operation timed out 7 mal aber jez steht da Operation reciefet 1000 mal der server startet so einfach ned was kann ich da maachen
Brauche Hilfe mit StringRegExp
06/02/2011 - AutoIt - 2 Replies
HI ich will aus einem link die ID auslesen... zb www.xxxyyy.com/wwf.test=3gf44h45u5j5ju5%_2323d2d /><tr> Ich will das rotmakierte auslesen, schaffe es aber nicht, weil ich scheinbar nicht die richtigen pattern benutze.... wäre echt super, wenn mir da jemand helfen könnte =) Mfg fx168



All times are GMT +1. The time now is 14:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.