Jump to content
Sign in to follow this  
eyeblue

Help Regex String Start

Recommended Posts

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 !

Share this post


Link to post
Share on other sites

What did you try so far?


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...