RegExpr Syntax

Hey

I’ve checked the help, searched the FAQ and racked my brains. I have a text file that has a large amount of info I want to extract in a long string.

For example:
DOG,218,16/10/07,CAT,50,16/10/07

I want to extract the value immediately following each animal through individual pins, in this case 218 & 50.
At the moment i’m using DOG,(\d+)CAT(\d+).
This works fine for individually but when joined together in the same node I outputs of 0 on each pin. The only alternative I can find is adding individual nodes for each query but with 100 values this will become unmanagable.

Any ideas and help on how I could tweak my syntax would be gratefully received.

Kenny

hi kenny,

what about

(\w+),(\d+)

?

Thanks so much…unfortunately not in front of copy of VVVV now so I’ll try later. I guess that would give me alternate pins giving animal and the value. I’ll have a go and let you know how I get on. Thanks again

PS. is the ’ , ’ how you seperate queries?

no, its the “,” becuase it’s the separator in your sample string.

if the separator was “foo”

DOGfoo218foo16/10/07fooCATfoo50foo16/10/07

you could use

(\w+)foo(\d+)

Hi,

I tried that but infortunately still didnt work. It seems to be a problem with the node recognising that the two queries surrounded by “( )” and outputting its solution to the seperate pins. Any ideas why this would be?

with the sample string you provided it worked for me.

i assume that you need to provide another example.

hey here is the data i’m using
“ABF.L”,785.50,“9/14/2007”,“7:05am”,-17.00,795.00,801.00,780.00,816407
“AL.L”,968.9999,“9/11/2007”,“11:35am”,+22.4999,955.00,976.5001,946.00,2465387
“ANTO.L”,690.925,“9/14/2007”,“7:05am”,-19.075,703.00,710.50,689.00,769858
“AV.L”,684.00,“9/11/2007”,“11:35am”,+11.00,682.50,686.50,674.50,10823130
“AZN.L”,2357.00,“9/14/2007”,“7:05am”,-31.00,2367.00,2387.00,2349.00,2410592
“BA.L”,463.50,“9/11/2007”,“11:35am”,+10.50,458.00,464.25,457.50,23973512

its the numbers that immediately follow the letters (ie. ABF.L)
thanks

is it everytime a “.L” following?

klj.v4p (5.0 kB)

indeed it does…
thank you i’ll look at that later

Thak you so much. Makes perfect sense now. I was fool trying to pull the info out of the pin for each individual item. I’ll just have to do that latter.
:-))