I want to match regexes (at least the basic ones, not all their possible kinds… for now…) in a text of Ruby script.
It’s something like a… \/\^? oh my god... \$?\/[eimnosux]*
Maybe I need recursive regex here.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As I commented above, you’ll need to parse Ruby to differentiate division slashes and regex delimiters. But for the simplest, SIMPLEST case without worrying about this, how about:
That is “A forward slash, followed by one or more things that either aren’t a forward slash or a backslash, or are a backslash followed by something else, finally followed by a slash, and possibly some regex flags.”