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
Two computers conected by ethernet to same router
Access is denied, unable to remove device when trying to delete a printer.
Change the login name of a user in a SQL Server 2005 database
Excel 2007 Can Not Display Images From Web
Setup BIND cache server
Mysql Query to select from two tables
Retrieve a list of unique values from a list object
how can I enter a genuine product key in Windows 7
Server 2008 R2 print server vs. XP clients
How can you search e-mail within Outlook 2010 and not use the index?