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
Finding multiple matches in join and also having 'grandchild' records in t-SQL
SQLCommandBuilder - GetUpdateCommand, GetInsertCommand and GetDeleteCommand Questions
Print jobs starting very slowly on HP laser
converting mp3 to ringtones for iPhone
Oracle forms and reports in Oracle 10g
Install .PFX file to personal store - Certificate Authority
802.1q trunk
What is the default for ExpiresDefault
Moving Domino 8 server
Upgrade mixed mode Windows 2000 forest/domain to Windows 2008 R2 forest/domain