• Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Bablosoft

Regex match multiple groups

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 1285 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gudolik
    wrote on last edited by
    #1

    Hi

    I'm trying to extract urls from variable and i tried regex

    ^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)
    

    Here example link:
    https://regex101.com/r/cusF8m/1

    I tried both blocks in BAS "Extract all data" and "First Match" and both gives first matched url, how i can get all matched urls like in example link?

    FoxF 1 Reply Last reply
    0
  • FoxF Offline
    FoxF Offline
    Fox Bablosoft Team
    replied to gudolik on last edited by
    #2

    @gudolik said in Regex match multiple groups:

    Hi

    I'm trying to extract urls from variable and i tried regex

    d0661b30-5c4a-4ccd-a7c9-0a8a41b9fb1d-изображение.png

    G 1 Reply Last reply
    0
  • G Offline
    G Offline
    gudolik
    replied to Fox on last edited by
    #3

    @Fox said in Regex match multiple groups:

    @gudolik said in Regex match multiple groups:

    Hi

    I'm trying to extract urls from variable and i tried regex

    d0661b30-5c4a-4ccd-a7c9-0a8a41b9fb1d-изображение.png

    Reason i ask for regex because i dont need http/https and URI just domains like

    example.com
    sub.example.com
    
    1 Reply Last reply
    0
  • FoxF Offline
    FoxF Offline
    Fox Bablosoft Team
    wrote on last edited by
    #4

    @gudolik said in Regex match multiple groups:

    Reason i ask for regex because i dont need http/https and URI just domains like

    The domain, if anything, could be removed later... In the action "Exctract all data" the flag "multi line" is disabled, if you turn it off in your example, it will find only one match:
    https://regex101.com/r/kUqEJr/1

    750c078f-e31a-46df-9a72-d45008aa2671-изображение.png

    In order for your regular expression to work, you need to enable the "multi line" flag

    (?m)^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)
    

    3d8e022c-a7be-457c-a3ac-5c5522270ca3-изображение.png

    G 1 Reply Last reply
    1
  • G Offline
    G Offline
    gudolik
    replied to Fox on last edited by
    #5

    @Fox Thank you!

    1 Reply Last reply
    0

  • B

    Want to launch multiple threads without delay

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    388 Views
    No one has replied
  • R

    How to lock clipboard for multiple threads?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    543 Views
    No one has replied
  • O

    How to login Multiple Account

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    492 Views
    No one has replied
  • T

    Running multiple instances that use Node

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    558 Views
    No one has replied
  • D

    how to upload photos from multiple folders?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    774 Views
    No one has replied
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
  • Login

  • Don't have an account? Register

  • Login or register to search.