Replaced literal brackets with LBRACKET and RBRACKET metacharacters
This commit is contained in:
		| @@ -115,7 +115,7 @@ func range2regex(start int, end int) string { | ||||
| 			if startSlc[i] == endSlc[i] { | ||||
| 				regex += string(rune(startSlc[i] + 48)) // '0' is ascii value 48, 1 is 49 etc. To convert the digit to its character form, we can just add 48. | ||||
| 			} else { | ||||
| 				regex += fmt.Sprintf("[%c-%c]", rune(startSlc[i]+48), rune(endSlc[i]+48)) | ||||
| 				regex += fmt.Sprintf("%c%c-%c%c", LBRACKET, rune(startSlc[i]+48), rune(endSlc[i]+48), RBRACKET) | ||||
| 			} | ||||
| 		} | ||||
| 		regex += ")" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user