Skip to content

Instantly share code, notes, and snippets.

Avatar

Arpit Mathur arpit

View GitHub Profile
@arpit
arpit / regex.txt
Created Jun 28, 2017
Regex for Comcast stuff
View regex.txt
(.*?)$
//Note the space at the beginning
^[A-Za-z]+
View jquery.insert.js
(function($){
var insertAtCaret = function(value) {
if (document.selection) { // IE
this.focus();
sel = document.selection.createRange();
sel.text = value;
this.focus();
}
else if (this.selectionStart || this.selectionStart == '0') {
var startPos = this.selectionStart;