Giter Club home page Giter Club logo

regex-lab's Introduction

RegEx Lab

This is a test driven ruby lab designed to get you comfortable using RegEx in combination with the .match and .scan methods. Run learn test and build out your methods in regex_lab.rb

Hint: You can use rubular.com as a handy tool to test your regular expressions as you write them.

regex-lab's People

Contributors

annjohn avatar deniznida avatar dfenjves avatar ihollander avatar lizbur10 avatar maxwellbenton avatar mendelb avatar taoliu12 avatar timothylevi avatar tuckerbohman5 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

regex-lab's Issues

Needs more.

This lab cannot be completed with the information presented. Needs more work.

Words Starting With Un Ending With Ing Test

The test explicitly states that for the method words_starting_with_un_and_ending_with_ing that it returns an array with the words starting with 'un' and ending with 'ing'. That means if a word contains un but doesn't begin with it, it doesn't qualify. As it stands text.scan(/un\w*ing\b/) passes. If the test included the word bunting or misunderstanding, this would not pass. Only text.scan(/\bun\w*ing\b/) would pass.

screen shot 2018-01-08 at 11 57 04 pm

screen shot 2018-01-08 at 11 56 46 pm

Rsepc test issue

should the digit in eq(6) be eq(5) since there are only 5 words in the test string which are five letters long

issue

Lessons Are Not Clear Leading Up to The LAb

The lessons for RegEx are good. They explain what it is and the different ways to use it in ruby. However, when you get to the lab, it is very tough to use what was learned in readings to get through the lab. I utilized different resources from Google to the AAQ forum on the lab. I passed but it took a while due to not fully understanding what needed to be done within the code. Maybe add a few more lessons and a deeper explanation of the functionality of the regex and how to utilize it within ruby.

Just a thought!

Need more content

I found this lab to be a bit difficult based on the information and resources provided. May want to consider including more information about things like the * . + operators which were mentioned in the regex basics objectives section but not mentioned in the content. Providing a couple of different examples that include ? true : false may also be beneficial as a refresher to get us all thinking about other ways to solve.

#valid_phone_number? test fails no matter what.

The current test iterates over an array of phone numbers and expects calls to #valid_phone_number with each number to return false. The problem with this is that there are valid phone numbers in the array which would cause the test fail.

Negative Test for valid_phone_number? Can Yield False Positive

The negative test for the valid_phone_number? method can yield a false positive if matching on the pattern "/\D?\d{3}[\D\s]?\d{3}[\D\s]?\d{4}/". This returns "true" when the method is called on [in]valid_numbers[1] ("(718)891-13135"). Whereas, it should return "false", if the pattern is not something like "/\D?\d{3}[\D\s]?\d{3}[\D\s]?\d{4}/$".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.