How to select multiple lines in Sublime Text (quickly)

I have a JS file that has over 100000 lines of code, I want to get rid of the first 25000, I’ve been trying hard but can’t figure out how do I select them all at once (holding left mouse button and scrolling down is not an option as it would take forever). I guess holding SHIFT and arrow DOWN is the way to go, but I have absolutely no idea how to select them all at once anyway. Maybe selecting 25000th line, pressing shift, left arrow and then HOME would help, but I’m working on OS X and have

Regex to select words with spaces for subsititution

I have string in JS which where I need to add ‘ to the values. Example: task: task one, client: Mr jhon will be converted to task:’task one’, client: ‘Mr Jhon’ Think of these string as user entered search query. This is then sent to the backed for the searching. The values need to be enclosed in ‘ Complexities taskname: one two three, client: Mr Jhon there can be more than 2 words taskname: one two, client: Mr Jhon more than 1 space taskname:one,client: Mr Jhon can be singe word without space priority:1,groupname: Mr Singh the name of can be

How to trim a file extension from a String in JavaScript?

For example, assuming that x = filename.jpg, I want to get filename, where filename could be any file name (Let’s assume the file name only contains [a-zA-Z0-9-_] to simplify.). I saw x.substring(0, x.indexOf(‘.jpg’)) on DZone Snippets, but wouldn’t x.substring(0, x.length-4) perform better? Because, length is a property and doesn’t do character checking whereas indexOf() is a function and does character checking. Answer If you know the length of the extension, you can use x.slice(0, -4) (where 4 is the three characters of the extension and the dot). If you don’t know the length @John Hartsock regex would be the right