Chuyển đến nội dung chính

freecodecamp: regular expression

freecodecamp: regular expression

How to pass these challenge? I note that snippet code. Help people to help myself.


Regular Expressions - Reuse Patterns Using Capture Groups
"let reRegex = /^(\d+)\s\1\s\1$/; // Change this line"
Use Capture Groups to Search and Replace
"let fixRegex = /good/; // Change this line
let replaceText = "okey-dokey"; // Change this line"
Remove Whitespace from Start and End
"let wsRegex = /\s{2,}/g; // Change this line
let result = hello.replace(wsRegex,''); // Change this line"

Nhận xét

Bài đăng phổ biến từ blog này

freecodecamp: React

freecodecamp: React step by step to practice Create a Simple JSX Element " const JSX = <h1>Hello JSX!</h1>; " Create a Complex JSX Element " const JSX=<div> <h1></h1> <p></p> <ul> <li></li> <li></li> <li></li> </ul> </div>; " Add Comments in JSX " const JSX = ( /* here in first time */ <div> <h1>This is a block of JSX</h1> <p>Here 's a subtitle</p> </div> ); " Render HTML Elements to the DOM " const JSX = ( <div id= 'challenge-node' > <h1>Hello World</h1> <p>Lets render this to the DOM</p> </div> ); // change code below this line ReactDOM.render(JSX,document.getElementById( 'challenge-node' )); " Define an HTML Class in JSX " cons...

Data Science: a novice approach

Data Science: a novice approach 1. Introduction :  The data science is hot until today 2018. I read a lot of article relate to this subject and I know many people excite to reach the data science but it's a huge domain that the explorer can be lost in a dark forest of knowledge. I used to research about the data science day by day with a different level( from zero to unknown where). My method is find out it as everybody did: search the keyword, read some books, try to practice somewhere. But all I get back are a chaos of objects. My sense about the data science is the same as an illusion. I forget it about 1 year and get back beside it. So this time, I try to illustrate the way to reveal the data science in short description. I write down to teach myself, to clear, to share.  What is the purpose of the data science? I remember one thing that is "get insight from messy data". I do many tasks in the data space to extract something that show the demanding values. The fi...