Jump to content

Recommended Posts

Posted

Indeed you have to have reference points.

The quistion is what comes afther the link? If you know that, it doens't realy mather how the end of the link looks.

Further the reason your getting the output

http://thisisalink.php
http://thisisalink.
php

Is because the RegExp you used look for multiple groups (..) an example

$SomeString = "http://myuser:mypass@www.somesite.com/index.php"
$output = StringRegExp($SomeString , 'http://(.*?):(.*?)@(.*?)\z' , 3)

MsgBox(0 , "test" , "username: " & $output[0])
MsgBox(0 , "test" , "password: " & $output[1])
MsgBox(0 , "test" , "site: " & $output[2])oÝ÷ Ø^Li)¶¬².Ü(®F¬àjËaz·­ë)iǬiû^®Ø^º¹ZºÚ"µÍØØ[    ÌÍÔÛÛYTÝ[ÈH  ][ÝÜÚ]LNËÝÝÝËÛÛYÚ]KÛÛKÙÚ[[YKÚ]LËÝÝÝËÚ]KÛÛKÈ    ][ÝÂÌÍØ^HHÝ[ÔYÑ^
    ÌÍÔÛÛYTÝ[Ë   ÌÎNÊÕJJÚJZÌLÜÉÌÎNËÊBÜ  ÌÍÚHHÈPÝ[
    ÌÍØ^JHLBSÙÐÞ
    ][ÝÝÝ    ][ÝÈ  ÌÍØ^VÉÌÍÚWJB^
+==================================================================+| The Definition of Madness: Creating a GUI, with GUI automation scripts |+==================================================================+
Posted (edited)

I see, then how could I apply your extension method?

Edit: I've found out the solution. Thanks for the help guyz. Seems like there is no way to detect an EndLine Or 2ndPoint Reference (any character).

My solution for my 2nd problem was just adding ?: to prevent the set from returning any reference.

StringReg("asdasdasdasdhttp://something.com", "(?U)((?:http://.*)(?:rar|html|com))", 3)
Edited by Zepx

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
×
×
  • Create New...