Posts by Alexander Mashin • 166 points
3 posts
- 
		1 votes1 answer44 viewsA: Regex to catch only one occurrence of the right equerdaSimply remove the \s and redundant parentheses, unless their regular expression is a capture in a larger: (?:[0-9]{1,3}\.){3}[0-9]{1,3}(?=\s|\)|$). Also add an advance statement (?=\s|\)|$) to… regexanswered Alexander Mashin 166
- 
		0 votes2 answers150 viewsA: Regex to remove the comma with a previous spacenovoArray = novoArray.toString().replace(/,(?!\d)/g, ""). 
- 
		4 votes2 answers68 viewsA: Comparison of numbers read with "io.read()" does not result in true as expectedMust be: x = io.read() if x ~= '0' then print (x .. ' deferente do 0') end if x == '1' then print (x .. ' igual a 1') end io.read() returns strings.…