MitsuStyle MitsuStyle

Go Back   MitsuStyle > The Homefront! > The Parking Lot - On & Off Topic

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-09-2015   #1
tehehodi
Braaaaaaaap!
 
tehehodi's Avatar
 

Join Date: Dec 2008
Location: Fridley
Drives: '09 Silveraydo
Posts: 2,028
Send a message via AIM to tehehodi
Computer haaaaalps

I need some help with the beep booping. I figured I can probably reach more nerds on here than my facebook. Maybe we can use this thread as a "I got a BSOD on such and such device because I watch too many adult films online" type of thread. Anyway, here we go...

JAVASCRIPT/REGEX NERDS! I need help with executing a regexp using the exec() method. I get an SyntaxError: invalid regexp group.
<script>
function regPatExample(){
//The address I'm trying to sift through: file:///C:/Users/test/Documents/School/Web%20Design%20and%20Implementatin/Assignments/result.html?firstname=testies&lastname=mctesticles
var address = window.location;
var regFirstName = /(?<==)(.*)(?=&)/;
var regLastName = /(?<=lastname=)(.*)/;
document.getElementById("firstname").value = regFirstName.exec(address);
document.getElementById("lastname").value = regLastName.exec(address);
}
</script>

When I put the address into my text editor(sublime text), I am able to use the regexp and it matches correctly.

Last edited by tehehodi; 12-09-2015 at 09:43 AM..
tehehodi is offline   Reply With Quote
 

Tags
aimhigherbruh, beep, boop, ialreadymake100k, javascripts, make100ktoday, nerd, some alien ass language, virgin talk


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -5. The time now is 06:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.