parse text

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sbrady
Posts: 105
Joined: 15 Mar 2014, 20:41
Location: Virginia Beach

parse text

17 Nov 2017, 06:30

below is the name of a file. How can I get just the text inside the parentheses......CHAPAV186n.2 Dream Time

SUV5 Newbell, Trillia score v1 (CHAPAV186n.2 Dream Time).wav
Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: parse text

17 Nov 2017, 06:46

Code: Select all

filename := "SUV5 Newbell, Trillia score v1 (CHAPAV186n.2 Dream Time).wav"
MsgBox % RegExReplace(filename, ".*\((.*)\).*","$1")
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
sbrady
Posts: 105
Joined: 15 Mar 2014, 20:41
Location: Virginia Beach

Re: parse text

17 Nov 2017, 06:49

genius, thanks.
sbrady
Posts: 105
Joined: 15 Mar 2014, 20:41
Location: Virginia Beach

Re: parse text

17 Nov 2017, 09:04

ran into trouble Odlanir,

Code: Select all

filelist = 

Loop, %clipboard%\*).wav
{
filename := A_LoopFileName
;msgbox % RegExReplace(filename, ".*\((.*)\).*","$1")    ;this works
filelist = %filelist%`n % RegExReplace(filename, ".*\((.*)\).*","$1")   ;this does not work
}
msgbox, %filelist%
Nightwolf85
Posts: 302
Joined: 05 Feb 2017, 00:03

Re: parse text

17 Nov 2017, 09:10

Try:

Code: Select all

filelist .= "`n" . RegExReplace(filename, ".*\((.*)\).*","$1")
sbrady
Posts: 105
Joined: 15 Mar 2014, 20:41
Location: Virginia Beach

Re: parse text

17 Nov 2017, 09:51

Nightwolf...........I need to pay you. Thanks a million. Wish I had a million to give you.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: parse text

17 Nov 2017, 10:09

Let's guess 100,000,000 HUF (Forint) will be fine to begin with. Don't hesitate to PM [Nightwolf85] for his account details :thumbup:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Joey5, lechat, sebalotek and 273 guests