Javascript RegEx failing....

i am using a regex in Javascript and keep getting an error.  I have used the same regex on several tester sites andthe parse works fine.  I can't figure out hwy it isn't working my implementation.

Here is the code snippet:

      var re = /^((?<!P\.?\s?O\.?\sBox).)+(?<!P\.?\s?O\.?\sBox)$/i;
      alert("??"+re.Exec(document.registerform.b_address.value));

It doesn't get to the alert before Firefox throws this error:

Error: invalid quantifier ?<!P\.?\s?O\.?\sBox).)+(?<!P\.?\s?O\.?\sBox)$
Source File: ...
Source Code:
      var re = /^((?<!P\.?\s?O\.?\sBox).)+(?<!P\.?\s?O\.?\sBox)$/i;

Thoughts?
awaters8Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ddrudikCommented:
JS doesn't support ?<= or ?<! constructs.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
awaters8Author Commented:
Bummer...Is there a way to accomplish a negative look back in JS?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

awaters8Author Commented:
Thanks for the quick response!
0
ddrudikCommented:
Thanks for the question and the points.
0
ozoCommented:
Doesn't /^((?!P\.?\s?O\.?\sBox).)+$/i do he same thing?
0
awaters8Author Commented:
It does...I'll report back if any of my test cases fail.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.