Microsoft
Software
Hardware
Network
Question : Negate of existing String inside of RegEx
Hi,
I need to build a RegEx where the following String will be found:
PERFORM XYZ-SECTION
or
perform abc-section
I need to exclude this:
perform varying i1 from 1 by 1
or
PERFORM VARYING I1 FROM 1 BY 1
All case-insensitive.
I found the examples above with the follwing RegEx:
$line=~ m/^.{6}\s+PERFORM\s+(\S+)(
$|\s|\./i
But with the given RegEx I found the loop's "Perform Varying" too. How build this RegEx to exclude the loops.
Using Perl as language for my RegEx.
Answer : Negate of existing String inside of RegEx
1:
$line=~ m/^.{6}\s+PERFORM\s+(?!varying)(\S+)($|\s|\./i
Random Solutions
Sort Mysql table with recent entries
Dot Net Written Test and Interview questions, Can any 1 suggest link
How do I create a class that handles file I/O for a car rental reservation program?
Server 2008 R2 - Can Connect to Server By IP, but not computer name
Rsyslog template regular expression
SUP7203B PFC incompatibility
Problem with file name comparison in unix script
event ID 39 - 40 -41- 42- 47 winmgmt
Offline address book cannot be downloaded after moving mailbox to exchange 2010
Install issue: XenApp 5 Feature Pack 3 on W2K8x64