Very concrete regexp question (TouchOSC related)
Very concrete regexp question (TouchOSC related)
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
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
Re: Very concrete regexp question (TouchOSC related)
Trial and error but I am getting there
[regexp (.*)/(.*)/(.*)]
...and outputting from backreferences...
[regexp (.*)/(.*)/(.*)]
...and outputting from backreferences...
Re: Very concrete regexp question (TouchOSC related)
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...
Something like [regexp /(.*)/(.*)/(.*)/?(.*)?] but better...
Re: Very concrete regexp question (TouchOSC related)
Were are these tutorials ?
Aboard from V. 1
MBP M1 Pro 2021 - 16 Go RAM - Monterey 12.6.3
MBP 2.5 Ghz I7 16 Go SSD OSX 10.14
iPad + Mira+ TouchOsc
RME FF UC Live 11.3.21 M4L Max 8
Band : https://elastocat.org/
Madlab sound unit / objects, guitar, electronics / end_of_transmission
MBP M1 Pro 2021 - 16 Go RAM - Monterey 12.6.3
MBP 2.5 Ghz I7 16 Go SSD OSX 10.14
iPad + Mira+ TouchOsc
RME FF UC Live 11.3.21 M4L Max 8
Band : https://elastocat.org/
Madlab sound unit / objects, guitar, electronics / end_of_transmission
Re: Very concrete regexp question (TouchOSC related)
Replacing slash by space will produce a list for any number of elements.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.
[regexp / @substitute " "]
Re: Very concrete regexp question (TouchOSC related)
Lovely. I wouldn't claim I understand why, but it works!
No, wait! I actually do
thank you broc!
No, wait! I actually do
thank you broc!
Re: Very concrete regexp question (TouchOSC related)
AKA: the only regexp I actually use. Like, ever. Makes OSC parsing ever so easy.broc wrote:[regexp / @substitute " "]
Alternatively one can just use OSC-route, but I typically prefer not to.
mbp 2.66, osx 10.6.8, 8GB ram.