| 
									
										
										
										
											2018-10-04 14:47:55 +01:00
										 |  |  | --- | 
					
						
							|  |  |  | title: Specify Only the Lower Number of Matches | 
					
						
							|  |  |  | --- | 
					
						
							| 
									
										
										
										
											2019-03-05 14:27:17 -06:00
										 |  |  | ## Specify Only the Lower Number of Matches
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-04 14:47:55 +01:00
										 |  |  | The Problem | 
					
						
							|  |  |  | Change the regex haRegex to match the word "Hazzah" only when it has four or more letter z's. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Solution | 
					
						
							|  |  |  | let haStr = "Hazzzzah"; | 
					
						
							|  |  |  | let haRegex = /Haz{4,30}ah/; // Change this line | 
					
						
							|  |  |  | let result = haRegex.test(haStr); |