?
Solved

RegEx Search

Posted on 2009-04-21
7
Medium Priority
?
193 Views
Last Modified: 2012-06-21
I am looking to do a regular expression search, where I want to search for all "<form" but disclude any "<form action-"/search".  I am not sure how to disclude the piece that I want, and also still include the quotation mark in the middle.  Any ideas?
0
Comment
Question by:mopar003
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1200 total points
ID: 24198466
How about

    \<form(?!action\-\"/search\")
0
 
LVL 1

Author Comment

by:mopar003
ID: 24198713
The search went through but found nothing, which I know is incorrect.  I just need to find all the forms, without the main form for the search that is on all the pages.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 24199081
does your regex flavour support lookahead?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:mopar003
ID: 24199189
Don't know.  I am using a program called Advanced Find and Replace.
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 400 total points
ID: 24199557
you need to check your docs
if it does not support lookahead, you cannot solve your problem with that tool
0
 
LVL 35

Expert Comment

by:Terry Woods
ID: 24201145
It probably won't help, from what you've said so far, but kaufmed's suggestion should include a space I think, or it would include the ones you want to exclude:

\<form(?! action\-\"/search\")
0
 
LVL 35

Assisted Solution

by:Terry Woods
Terry Woods earned 400 total points
ID: 24211913
I downloaded the tool you have (and tested it, and read the docs) and it doesn't appear to support the look ahead functionality, so I agree with ahoffmann that it will not solve this problem for you. Do you have access to a linux environment? A find command combined with grep or egrep in linux would likely do the job.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin Regular expression is a language that we use to edit a string or retrieve sub-strings that meets specific rules from a text. A regular expression can be applied to a set of string variables. There are many RegEx engines for u…
I have been reconstructing a PHP-based application that has grown into a full blown interface system over the last ten years by a developer that has now gone into business for himself building websites. I am not incredibly fond of writing PHP code o…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question