I didn’t find anything about regex on Russian-language RU-vid, so I came here. Thank you, my English-speaking colleague, you really helped me understand.
The youtube ads kicked in right after you said "And now, a word from our sponsors", I've never witnessed such perfect timing in my life. Thanks a lot for the videos :D
Thank you so much! Yes, there isn't much out there. I struggled to understand it for that reason. So I made something more in-depth and fundamental. More to come in the next few months!
Thank you very much for the explanation, all your vids on regex were very well explained, very useful, I could use it to make new things in my sub that I didn't think I would be able to, great vid !
Wow, ty for covering this. My mind came up with ultimate plan already. That is, combining regex component with logic gates and operating fully automatic submarine, like 'push that button and it will do the rest'. I know there is autopilot, but while impressive in navigating around cliffs it's not as flexible as human captain would be (or my fabulous sub' operating system >:-] ).
I feel like what is missing in the video is saying wheter the output can be what you found in barotrauma because while finding what you are looking for and outputting something completly different is useful its just as useful to be able to output what you have found and if you can't do that what you can do instead.
That's a really good point! At 1:22, I should have said something more like this: Output indicates something you found or not found, and the result displayed is copied from a direct entry (e.g. via a Memory component) or a capture group.
Thanks for the intro to regex! It was really confusing me. What's confusing me even more is that a Memory + Terminal -> Concat -> Regex doesn't seem to work. Always producing a False Output no matter what syntax I try. Would you be able to know anything about resolving that?
You're welcome! I'm glad this video cleared some things up. As for your question about memory/terminal/concat use with regex, I tried this on my end and I was able to get a True Output using your combination. I hooked up every component's output to a Text Display so I could see everything that was happening while I configured it. I noticed Concat does not update until there is a new input in the Terminal. Here were my inputs for each component: Memory - a Terminal - b Concat combined this as - ab Regex Expression - \w Regex Output - PASS Regex False output - FAIL Tick on Regex Continuous output. Based on the above configuration, the output said "PASS". For comparison, I used \d and it said "FAIL". So it worked as expected. So maybe try replicating that first and if it works, then see what you can adjust from there. I hope that helps!
I love this question! It's quite complicated to pull off and this video does not cover enough basics for it. My upcoming barotrauma tutorials will cover this in more detail. But here's a quick solution: ^\d?\d$ This accepts everything from 0 to 99. Searching for 0 to 12 will look more like this: ^(10|11|12|\d)$ So anchors, alternation and a capture group is used to give you specific control over what you are searching for.