Return two variables from query

Discussion in 'A-Parser Support Forum' started by Vertek, Oct 27, 2019.

  1. Vertek

    Vertek A-Parser Pro License
    A-Parser Pro

    Joined:
    Oct 8, 2019
    Messages:
    7
    Likes Received:
    2
    Hello,

    I am trying to extract domain from URL with regex in variable and in second variable whole URL:

    www.google.com | https://www.google.com/search?sxsrf=ACY...

    This is what i figured out.
    upload_2019-10-27_15-44-54.png

    Could you explain to me how i can use second variable in the same array? Because when i try to use it like this:
    upload_2019-10-27_15-47-37.png

    The result is completely empty. When i using it in this way:
    upload_2019-10-27_15-48-13.png

    The result is:

    www.google.com none
    ...

    I was trying to make second group with regex. In first group to get only domain, in second group to get whole URL but working the same as above (*domain* none)

    Thanks!
     
  2. Support

    Support Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 16, 2012
    Messages:
    2,732
    Likes Received:
    1,640
    Do as in the screenshot below: use two groups in the regular expression and output the result correctly.
    [​IMG]
     
    Vertek likes this.
  3. Vertek

    Vertek A-Parser Pro License
    A-Parser Pro

    Joined:
    Oct 8, 2019
    Messages:
    7
    Likes Received:
    2
    Okay, so the problem was in my regex pattern.
    $1,$2,$3,... in arrays mean groups from regex pattern, am i right?
     
  4. Support

    Support Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 16, 2012
    Messages:
    2,732
    Likes Received:
    1,640
    Yes, you are right
     
    Vertek likes this.

Share This Page