You cannot post messages because only members can post, and you are not currently a member.
Description:
Discussing Regular Expressions in variuos tools (perl, php, egrep, PowerGREP, .NET, procmail etc. etc). Let's help each other build effective regexes!
|
|
|
Find Hex number
|
| |
Hello,
Suppose I have this hex input: "78FE8909CD" etc
Can somebody please let me know what should be the RE to find a
particular byte ?
Say I want to find 8F from the above input ?
RE should return false, because 8F is not found as a byte because the
bytes would be:7F, FE, 89, etc
Is is possible to find this using RE ?... more »
|
|
Help with inverse of regular expression
|
| |
I have a working regex that selects all <def>...</def> tags.
<def\b[^>]*>(.*?)</def>
The problem is that I want to select everything other than the def
tags and their contents. How would I go about this?
|
|
JavaScript RegEx Parse Command Line into Array
|
| |
I need a javascript method that will parse a command line instruction
into an array of pairs. The method should utilize the javascript
String.match or other regular expression enabled methods to implement
the parse. The regex should be implemented in a very terse
instruction. The deliverable for this project is a terse javascript... more »
|
|
regex for.. well, anything?
|
| |
hello,
im a seasoned programmer but a regex newb. ive read some excellent
tutorials over the years, but i still often find myself starting all
over with baby steps when it comes to regexes. dunno why.
i need to plug in a regex into a software tool that validates a
string. for this particular string, i dont care *what* the value is,... more »
|
|
tricky question
|
| |
Hi, does anyone know how to do this? I’ve been banging my head on this
one all day (I’m not very good at this):
I am looking for a pattern to find all groups of digits separated by
blanks but not including the last blanks, e.g.
‘blah blah 12 dsa 12 43 999 etc.’ (should be in fixed size font)... more »
|
|
newbie question
|
| |
hello,
i have a test regex that looks for one of two possible favorite
colors:
red|blue
...no problem. now id like to include "Favorite color: " into the test
string, like so:
Favorite color: blue
...how do i modify the original regex to include this static label?
ive tried /b but it didnt work out.... more »
|
|
seems there is a bug in PowerGREP?
|
| |
Hello, it seems there is a bug in powerGREP. i tried version 3.4.2 I am searching for *(\d+\b).*?\1 * through a line of comma separated values: 12, 22, 3, 45, 3, 36 Here is what i get in PowerGREP 12, 22, 3, 45, 3, 36 (if you use html enabled mailer you should see the colored matches) While I agree with "3, 45, 3" match , I definitely can not agree with the... more »
|
|
How to find duplicate numbers between commas?
|
| |
I have a following regex in .NET
^(?!.*?\b44\b)(?:\s*(\d+)\s*,? )*$
This will allow comma separated list of numbers, excluding one number
I specified (e.g. 44 from above). I would like to modify that to not
allow any duplicates numbers in the list.
For example
12, 22, 3, 45, 3, 36
should fail the validation since number 3 has been repeated. Is that... more »
|
|
Regex advice needed - C language
|
| |
How do I construct a regex that finds just the first instance in the
following test sample -
...//#define LOGGING_ENABLED
// #define LOGGING_ENABLED
/* #define LOGGING_ENABLED */
/*#define LOGGING_ENABLED*/
i.e. the result should be #define LOGGING_ENABLED. As you can see I am
trying to find instances of the #define which are not commented out.... more »
|
|
|