Hi,
(yes.... it's me again...)
So, I want to RegExt() a Read() function in Populate-Variables-Node:
%s_MyExtractedVariable% = $regext($read("%s_original_path%\%s_archnumber%\FPS.fps")),[^\r\n]+)
but I cannot get it to work.
This function is meant to read the content of a text-file (FPS.fps). This textfile has only one Line of text but it has LF/CR at the end of the line. I only need the text - without the LF / CR.
Any idea...?
thanks in advance,
tom
How to nest a function into a function?
Re: How to nest a function into a function?
@momocampo what do you think?
emcodem, wrapping since 2009 you got the rhyme?
Re: How to nest a function into a function?
Hello,
Damn...
If "LF/CR" is always at the end maybe we can use :
/(\w+) /
I 'm right?
cheers.
EDIT : Maybe more that : /(\w+\s+)((LF\/CR))*/
NB :Encodem you are so cruel with me...
Damn...
If "LF/CR" is always at the end maybe we can use :
/(\w+) /
I 'm right?
cheers.
EDIT : Maybe more that : /(\w+\s+)((LF\/CR))*/
NB :Encodem you are so cruel with me...
Re: How to nest a function into a function?
Hi ,
Got it:
$regext($read("%s_original_full%"),"(.+)")
Hours of try and error... and it is so easy... Horror for a 1980ies BASIC kid like me...
@emcodem
@momocampo
thank you anyway!
cheers,
tom
Got it:
$regext($read("%s_original_full%"),"(.+)")
Hours of try and error... and it is so easy... Horror for a 1980ies BASIC kid like me...
@emcodem
@momocampo
thank you anyway!
cheers,
tom
Re: How to nest a function into a function?
Congrats Thomas!
@momocampo yeah, sorry... this time i tricked you out, i feared you were going to concetrate on the regex instead of the syntax of the command that Thomas Posted
Basically anything that is not a function (like $read or $regext) needs to be enquoted into doublequotes - but only in processors/inputs that accept functions ^^
@momocampo yeah, sorry... this time i tricked you out, i feared you were going to concetrate on the regex instead of the syntax of the command that Thomas Posted
Basically anything that is not a function (like $read or $regext) needs to be enquoted into doublequotes - but only in processors/inputs that accept functions ^^
emcodem, wrapping since 2009 you got the rhyme?
Re: How to nest a function into a function?
Hé hé don't worry Encodem, I knew about doublequotes (I didn't see in fact) but I wrote only the second part of function, the part of regex.
Anyway, I'm afraid not to be enough good yet...I need a lot of training.
@Thomas : Good to hear if all is ok
Anyway, I'm afraid not to be enough good yet...I need a lot of training.
@Thomas : Good to hear if all is ok
Re: How to nest a function into a function?
$regext($read("%s_original_full%"),"(.+)") should actually be $regext("$read("%s_original_full%")","(.+)") in case the $read() returns a comma ',' character.
@emcodem, single quotes will also work: $regext('$read('%s_original_full%')','(.+)')
So the rule inside a function is: Everything that is or will end up as text string should be encapusalted with double or single quotes.
-steinar
@emcodem, single quotes will also work: $regext('$read('%s_original_full%')','(.+)')
So the rule inside a function is: Everything that is or will end up as text string should be encapusalted with double or single quotes.
-steinar