Jump to content

Recommended Posts

Posted

I have string
number=1
number=2
number=3
selector 
number=4
number=5
number=6

I need regex start string selector  take number 4&5&6 in one pattern unique stringregexp . I don't want regex twice. Please help me, thank you so much !

Posted (edited)

Here is one
As usual, it works with the provided text but will need to be amended if the requirements are differents in the real life
:idiot:

#Include <Array.au3>

$text = "number=1" & @crlf & _
    "number=2" & @crlf & _
    "number=3" & @crlf & _
    "selector " & @crlf & _
    "number=4" & @crlf & _
    "number=5" & @crlf & _
    "number=6"
;Msgbox(0,"", $text)

$a = StringRegExp($text, '(?s).*selector(*SKIP)(*F)|(\d+)', 3)
_ArrayDisplay($a)

 

Edited by mikell

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...