Results 1 to 5 of 5
-
31st May 2012, 09:09 PM #1OPMemberWebsite's:
maxneeds.infoJQuery and RegExr Help :|
Hi guys.
I have really big difficulties of doing the following so any help would be appreciated.
Here's my stack
Code:$(document).test(1000).mouseover(function(){ alert(1); alert(2); }); $(document).inbetween(); $(document).test(2000).mouseover(function(){alert(1); alert(2);});
I have the following pattern but can't do it good enough to work.
\$\(.*\)\.test\(\d*\)\.(?:\r|\n|.)+\);(?:\$)+
Thanks
EDIT: Ok i found the proper pattern guys. It's :
\$\(.*\)\.test\(\d*\)\.[^\$]*Porsche_maniak Reviewed by Porsche_maniak on . JQuery and RegExr Help :| Hi guys. I have really big difficulties of doing the following so any help would be appreciated. Here's my stack $(document).test(1000).mouseover(function(){ alert(1); alert(2); }); $(document).inbetween(); Rating: 5
-
31st May 2012, 09:38 PM #2Member
well regarding the pattern, I don't really see why (?:\$)+ is at the end, it means 'at least one dollar sign after the ;' and maybe you need to make the '.' non-greedy by adding question marks: \$\(.*?\)\.test\(\d*\)\.(?:\r|\n|.)+?\);
-
31st May 2012, 09:53 PM #3OPMemberWebsite's:
maxneeds.infoYes i know that (?:\$)+ is not correct. But i think thats the only way delimiter for the next match.. or maybe you are close ?
The thing is that if i have a function or something that ends with ); inside the mouseover function the regex doesn't work as expected.Your pattern matches till the first occurance of );
but it should be to the last. How to do this?
-
31st May 2012, 11:25 PM #4Member
Yes you're right... I think for this you need to match nested parentheses and such, and Regular expression is not the best tool for that.
http://stackoverflow.com/questions/1...ested-patterns
-
1st Jun 2012, 12:26 AM #5OPMemberWebsite's:
maxneeds.info@deliteblogger thanks for you help
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[Hiring] Coder with exp in DLE, jquery
By newshit in forum Completed TransactionsReplies: 0Last Post: 11th Jan 2012, 09:42 PM -
JQuery help
By xElliex in forum Web Development AreaReplies: 5Last Post: 25th Aug 2011, 10:38 PM -
jQuery Tooltips Help
By Chris2k in forum Web Development AreaReplies: 1Last Post: 11th May 2011, 07:18 PM -
jQuery tooltip help :S
By Porsche_maniak in forum Web Development AreaReplies: 5Last Post: 20th Oct 2010, 04:27 PM -
Anyone who knows Javascript / jquery / Css
By Czechi in forum Completed TransactionsReplies: 5Last Post: 17th Aug 2010, 06:41 AM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...