Freecodecamp: [beta] Improve Instructions for "Regular Expressions: Ignore Case While Matching"

Created on 2 Feb 2017  路  2Comments  路  Source: freeCodeCamp/freeCodeCamp

Challenge ignore-case-while-matching has an issue.
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36.

It feels like these two sentences could be combined into a shorter alternative.

There are other flags but here you'll focus on the flag that ignores case.

The flag that ignores case is the i flag.

I suggest we replace the sentences above with

There are other flags, but here you'll focus on the one that ignores case - the i flag.

help wanted learn

Most helpful comment

I'll take this up..

All 2 comments

Sounds good to me. I wrote these instructions and thought it would be nice to preface the introduction with some motivation. But I also like conciseness 馃憤

So the third paragraph should now read

You can match both cases using what is called a flag. There are other flags, but here you'll focus on the flag that ignores case - the i flag. You can use it by appending it to the regex. An example of using this flag is /ignorecase/i. This regex can match the strings "ignorecase", "igNoreCase", and "IgnoreCase".

I'll take this up..

Was this page helpful?
0 / 5 - 0 ratings