Match specific lines [closed] - regex

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Is there a shorter way of writing this with or without regex?
Dim q1 = System.Text.RegularExpressions.Regex.Match(myString,
"[\n\r]finished", System.Text.RegularExpressions.RegexOptions.IgnoreCase)
If (q1.Success) Then Exit Sub

Yes:
Imports System.Text.RegularExpressions
If (Regex.IsMatch(SubjectString, "(?i)\nfinished")) Then Exit Sub
(it should be enough to check for \n unless you're also targeting old Macs (pre-OS X) files that only use \r for newlines)

Related

I need basic regex code [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
/edit?o=U&video_id=xxxxxxxxxxxx&show_mt=1
/edit?o=U&show_mt=1&video_id=xxxxxxxxxxxx
I want get video_id query using regex (xxxxxxxxx)
I am using VB.NET
Thanks for help!
M. Deger
Edit: I want only regex code eg: [^?]+(?:\?video_id=([^&]+).*)?
Untested:
(?<=video_id\s*=\s*)[^&]*(?=&|$)
or, result in capture group 1
video_id\s*=\s*([^&]*)(?:&|$)

Regex:password all character are allowed,but not include space [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Regex:password all character are allowed,but not include space,length is 8-16.please give me an efftive help.
Consider the following Regex...
^\S{8,16}$
Good Luck!

RegEx - Add new conditions to existing regex [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I currently have this Regex:
.*[a-z]$|.*[A-Z]$|.*[0-9]$
I need to add the following to the existing - /:.#[]()
Does anyone know how to do it?
You don't need multiple OR conditions. Have only one and include special characters also:
[0-9A-Za-z\/#:.()\[\]]
Per your comments, this should do it for you:
^[a-zA-Z0-9/:.#\[\]()]+$
This will match a string containing only the characters you've specified.

In Perl - How to normalize Path for windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I am new in Perl, but i need to know how to get variable contain specific path normalized for windows.
Thanks,
MaMd0u7
http://perldoc.perl.org/File/Spec.html
use File::Spec::Win32
my $dir = File::Spec::Win32->catfile('directory','tree','file.html');
print $dir;
output: directory\tree\file.html
any use?

How drop packet with libiptc in c++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Is there a way to drop packets with libiptc c++?,i want a sample code for drop packet with libiptc in c++.
for this you should write a driver.
for example you can use main_hook function.