Skip to content

Instantly share code, notes, and snippets.

View arpit's full-sized avatar

Arpit Mathur arpit

View GitHub Profile
(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;
@arpit
arpit / regex.txt
Created June 28, 2017 16:34
Regex for Comcast stuff
(.*?)$
//Note the space at the beginning
^[A-Za-z]+