Solved

Regular Expression (Excluding String)

Posted on 2013-05-16
4
357 Views
Last Modified: 2013-05-16
I have a regular expression like this: (\)([^:-]*):\d+)

It finds a group of strings. But I want to exclude the strings that include what I have in quotes: " DL "

Any assistance is appreciated.
0
Comment
Question by:Neapolitan23
  • 2
  • 2
4 Comments
 
LVL 21

Expert Comment

by:Mazdajai
Comment Utility
Do you have a sample input?
0
 

Author Comment

by:Neapolitan23
Comment Utility
#1:  ) DL Notes CWS 10:05 pm
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 500 total points
Comment Utility
Try

(\)\s(?!DL)([^:-]*):\d+)

Open in new window

0
 

Author Closing Comment

by:Neapolitan23
Comment Utility
Awesome! Works great.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

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…
As most anyone who uses or has come across them can attest to, regular expressions (regex) are a complicated bit of magic. Packed so succinctly within their cryptic syntax lies a great deal of power. It's not the "take over the world" kind of power,…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now