Ruby Does My Regex not Match
Since learning Ruby, I have had to become comfortable with using the command line, the syntax and regex. I am not a big fan of regex, since working on C# I can single handily count how many regexes I have written. In the Ruby world, however, authoring regexes is part and parcel of everyday life.
Tonight I was playing around with my regexes but couldn’t find a way for Ruby to tell me when it couldn’t find a file that was asked for.
Tonight I found this of code that I hope will go a long way in solving my needs. This code will tell you whether or not a string value matches what is used in a regex.
'x' !~ /x/
This is awesome. With a simple regex, I am able to get a lot of mileage out of the code I have written.
This is an exciting time for me and what better time to write some good rock-solid code.
I was also super tired writing this, so if none of this makes sense I appologies.