RegExMatch little help

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
euras
Posts: 429
Joined: 05 Nov 2015, 12:56

RegExMatch little help

29 Nov 2017, 04:52

I have a block of text and some lines are like a flag to me where the area I want to get begins and ends. With RegExMatch I can select that are, but I select also those flags. I need to erase the first line and the last line from my variable. Is it a easier way to do this then use loops, index and so on?

Code: Select all

txt =
(
some text
some text
text where the area starts
the line I need to get
the line I need to get
text where the area ends
some text
)
ttx := RegExMatch(txt, "(text where the area starts\X+?text where the area ends)", New_Body)
MsgBox % New_Body1
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: RegExMatch little help

29 Nov 2017, 13:42

ttx := RegExMatch(txt, "text where the area starts(\X+?)text where the area ends", New_Body)

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], septrinus and 292 guests