Page 1 of 1

parametric field of SET datatype and Meta tag

Posted: Wed Feb 16, 2011 9:51 am
by michel.weber
I'm trying to fill a parametric field defined as SET datatype from HTML Meta tag containing multiple values via the 'Data from Field' option

As an added difficulty, the values i have to extract contain ','.

I have figured out a REX that works and returns the correct set members, but i haven't figured a way to tell to put that result into the parametric field as separate set members

Ex.:
<meta name="m1" content="item1=a,b,item2=c">

The retrieved set should be : ('a,b','c') i.e. two items.


In the replace part i have tried the following syntaxes but i always end up with one set member :
!!\2,!!\5!! ==> ('!!a,b!!,c!!')
I expected this one to work or berhaps give me 3 set members

I tried the followin as well just in case
!!\2|!!\5!! ==> ('!!a,b!!|c!!')
!!\2 !!\5!! ==> ('!!a,b!! c!!')

parametric field of SET datatype and Meta tag

Posted: Wed Feb 16, 2011 10:53 am
by Kai
You don't need a replace expression; you can make a search expression that just returns what is needed:

>>item=\digit+\=\P=!,item+'

i.e. look for everything after an `itemN=' tag, up to (but not including) the next `,item' tag (if any). This assumes no space separation in the list (remove the comma if so, or use a replace expression to remove trailing space/commas).

parametric field of SET datatype and Meta tag

Posted: Thu Feb 17, 2011 7:59 am
by michel.weber
Thanks for the quick reply

just as a matter of interest, why does the replace part not work?

parametric field of SET datatype and Meta tag

Posted: Wed Feb 23, 2011 4:15 pm
by michel.weber
MMh

This now works as long as i walk the pages, but it does not seem to work with the DATALOAD API (SOAP)

If i remember correctly this was not supported in older scripts, but i was under the impression that it was working now (see http://thunderstone.master.com/texis/ma ... b97c7251a=

Can you confirm that this should work with appliance 7.1.8 or / and webinator 5.1.88.

parametric field of SET datatype and Meta tag

Posted: Mon Feb 28, 2011 11:00 am
by michel.weber
Kai

I modified your rex a little bit to get at the "itemN" parts : >>item=[A-Z\-]+[a-zA-Z0-9\-]+\=\F=!, item+

Given the same example : <meta name="m1" content="itemToto=a,b, itemMachin=c">

It works fine with a field of type SET where i get a set of (itemToto,itemMachin)
but with a field of type TEXT, i only get the first 'item' ie. 'itemToto'

I could not figure out one that gives me all of them

Can you help a bit more?

How would i get "item1,item2,...,itemN" into a parametric field of type TEXT

parametric field of SET datatype and Meta tag

Posted: Wed Mar 02, 2011 10:57 am
by John
There isn't a way to pull multiple items out and string them back together.

The data from field should work with the DataLoad if you specify "RawData" to be parsed. If you give it Body instead then it is assumed to be pre-parsed and you are providing all the fields as you want them.