All times are UTC

 
 



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Very concrete regexp question (TouchOSC related)
PostPosted: Sun Mar 24, 2013 2:57 pm 

Joined: Thu May 05, 2005 5:42 pm
Posts: 395
Hello,
I have gone through ShelLusers excellent regexp tutorials but some aspects still remain unclear, namely routing issues. Most concretely I'd need to get the forelast element from /3/multitoggle3/6/1

All concrete help (and also a bit of extra theory around routing) most welcome!
toscanini


Top
 Profile  
 
 Post subject: Re: Very concrete regexp question (TouchOSC related)
PostPosted: Sun Mar 24, 2013 6:48 pm 

Joined: Thu May 05, 2005 5:42 pm
Posts: 395
Trial and error but I am getting there :idea:

[regexp (.*)/(.*)/(.*)]

...and outputting from backreferences...


Top
 Profile  
 
 Post subject: Re: Very concrete regexp question (TouchOSC related)
PostPosted: Sun Mar 24, 2013 8:12 pm 

Joined: Thu May 05, 2005 5:42 pm
Posts: 395
Ok there is still a problem left, what TouchOSC sends to [udpreceive] has either 3 or 4 elements. (by "elements" I mean the data between the slashes, for example /3/multitoggle3/6/1). I haven't found the solution yet that works both ways.
Something like [regexp /(.*)/(.*)/(.*)/?(.*)?] but better...


Top
 Profile  
 
 Post subject: Re: Very concrete regexp question (TouchOSC related)
PostPosted: Mon Mar 25, 2013 6:35 am 

Joined: Fri May 02, 2003 6:38 am
Posts: 1267
Location: France
Were are these tutorials ? 8O

_________________
Aboard from V. 1
MBP 2,3 ghz I7 4Go RAM OS 10.8.5 X-station/iPad2+Mira+Lemur/PadKontrol/BCR+BCF2000/ Livid Code
RME FF UC Live 9.0.6 / 9.1.1 + MFL + Max 6.16 Yeepee !
Madlab sound unit :/: sounds FX, objects, guitar and electronics :/: end_of_transmission


Top
 Profile  
 
 Post subject: Re: Very concrete regexp question (TouchOSC related)
PostPosted: Mon Mar 25, 2013 8:12 am 

Joined: Thu May 05, 2005 5:42 pm
Posts: 395
http://synthfan.info/mytutorials/

"blog" tutorials on the bottom of the page.


Top
 Profile  
 
 Post subject: Re: Very concrete regexp question (TouchOSC related)
PostPosted: Mon Mar 25, 2013 10:22 am 

Joined: Mon Jul 26, 2004 8:37 am
Posts: 1076
toscanini wrote:
Ok there is still a problem left, what TouchOSC sends to [udpreceive] has either 3 or 4 elements. (by "elements" I mean the data between the slashes, for example /3/multitoggle3/6/1). I haven't found the solution yet that works both ways.

Replacing slash by space will produce a list for any number of elements.

[regexp / @substitute " "]


Top
 Profile  
 
 Post subject: Re: Very concrete regexp question (TouchOSC related)
PostPosted: Mon Mar 25, 2013 11:22 am 

Joined: Thu May 05, 2005 5:42 pm
Posts: 395
Lovely. I wouldn't claim I understand why, but it works!
No, wait! I actually do :lol:
thank you broc!


Top
 Profile  
 
 Post subject: Re: Very concrete regexp question (TouchOSC related)
PostPosted: Fri Mar 29, 2013 11:25 pm 

Joined: Thu Jun 24, 2004 2:15 pm
Posts: 11650
Location: Denmark
broc wrote:
[regexp / @substitute " "]


AKA: the only regexp I actually use. Like, ever. Makes OSC parsing ever so easy.

Alternatively one can just use OSC-route, but I typically prefer not to.

_________________
mbp 2.66, osx 10.6.8, 8GB ram.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC

 
 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group