Sponsored Content
Full Discussion: Regex to exclude numeric
Top Forums Shell Programming and Scripting Regex to exclude numeric Post 302887358 by tpx99 on Friday 7th of February 2014 02:25:47 AM
Old 02-07-2014
Regex to exclude numeric

Dear All,

My regex is like below. Its says all the number in coloum is include.

11666
11777
11888

^(?\: (0|11)(666|777|888))\\d+$



How to exclude all the numeric that not mentioned in above regex.


Regards,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

With Regex Spliting the string into Alphanumeric and Numeric part

Hi there With shell script I'm trying to split the string into two parts. One is alphanumeric part, the other one is a numeric part. dummy_postcode_1 = 'SL1' --> res_alpha = 'SL' and res_numeric = '1' dummy_postcode_2 = 'S053' --> res_alpha = 'S' and res_numeric = '053' ... (1 Reply)
Discussion started by: ozgurgul
1 Replies

2. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

3. UNIX for Dummies Questions & Answers

Find and Replace random numeric value with non-numeric value

Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is: 1702938475,SNU022,201004 the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies

4. Shell Programming and Scripting

Converting perl regex to sed regex

I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly: if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies

5. Ubuntu

[Solved] Using Find with an exclude/exclude file

I am familiar with using tar and exclude/include files: tar zcf backup.dirs.tgz --files-from=include.mydirs --exclude-from=exclude.mydirs --no-recursion but was wondering if I could use find in the same way. I know that you can just specify the directories to exclude but my list is... (2 Replies)
Discussion started by: metallica1973
2 Replies

6. UNIX for Dummies Questions & Answers

read regex from ID file, print regex and line below from source file

I have a file of protein sequences with headers (my source file). Based on a list of IDs (which are included in some of the headers), I'd like to print out only the specified sequences, with only the ID as header. In other words, I'd like to search source.txt for the terms in IDs.txt, and print... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

7. Shell Programming and Scripting

Generate Regex numeric range with specific sub-ranges

hi all, Say i have a range like 0 - 1000 and i need to split into diffrent files the lines which are within a specific fixed sub-range. I can achieve this manually but is not scalable if the range increase. E.g cat file1.txt Response time 2 ms Response time 15 ms Response time 101... (12 Replies)
Discussion started by: varu0612
12 Replies

8. Shell Programming and Scripting

Perl, RegEx - Help me to understand the regex!

I am not a big expert in regex and have just little understanding of that language. Could you help me to understand the regular Perl expression: ^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{ ------ This is regex to select functions from a C/C++ source and defined in... (2 Replies)
Discussion started by: alex_5161
2 Replies

9. Shell Programming and Scripting

Grep string with regex numeric characters

Hi all, I have the following entries in a file: Cause Indicators=80 90 Cause Indicators=80 90 Cause Indicators=82 90 Cause Indicators=82 90 Cause Indicators=82 90 The first 2 digits might change so I am after a sort of grep which could find any first 2 digits + the second 2,... (3 Replies)
Discussion started by: nms
3 Replies

10. Shell Programming and Scripting

Sendmail K command regex: adding exclusion/negative lookahead to regex -a@MATCH

I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works: LOCAL_CONFIG # Kcheckaddress regex -a@MATCH +<@+?\.++?\.(us|info|to|br|bid|cn|ru) LOCAL_RULESETS SLocal_check_mail # check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies
MB_REGEX_SET_OPTIONS(3) 						 1						   MB_REGEX_SET_OPTIONS(3)

mb_regex_set_options - Set/Get the default options for mbregex functions

SYNOPSIS
string mb_regex_set_options ([string $options = mb_regex_set_options()]) DESCRIPTION
Sets the default options described by $options for multibyte regex functions. PARAMETERS
o $options - The options to set. This is a string where each character is an option. To set a mode, the mode character must be the last one set, however there can only be set one mode but multiple options. Regex options +-------+-------------------------------+---+---+ |Option | | | | | | | | | | | Meaning | | | | | | | | +-------+-------------------------------+---+---+ | i | | | | | | | | | | | Ambiguity match on | | | | | | | | | x | | | | | | | | | | | Enables extended pattern form | | | | | | | | | m | | | | | | | | | | | | | | | | '.' matches with newlines | | | | | | | | | s | | | | | | | | | | | | | | | | '^' -> 'A', '$' -> '' | | | | | | | | | p | | | | | | | | | | | Same as both the m and s | | | | | options | | | | | | | | | l | | | | | | | | | | | Finds longest matches | | | | | | | | | n | | | | | | | | | | | Ignores empty matches | | | | | | | | | e | | | | | | | | | | | eval(3) resulting code | | | | | | | | +-------+-------------------------------+---+---+ Regex syntax modes +-----+----------------------------+---+---+ |Mode | | | | | | | | | | | Meaning | | | | | | | | +-----+----------------------------+---+---+ | j | | | | | | | | | | | Java (Sun java.util.regex) | | | | | | | | | u | | | | | | | | | | | GNU regex | | | | | | | | | g | | | | | | | | | | | grep | | | | | | | | | c | | | | | | | | | | | Emacs | | | | | | | | | r | | | | | | | | | | | Ruby | | | | | | | | | z | | | | | | | | | | | Perl | | | | | | | | | b | | | | | | | | | | | POSIX Basic regex | | | | | | | | | d | | | | | | | | | | | POSIX Extended regex | | | | | | | | +-----+----------------------------+---+---+ RETURN VALUES
The previous options. If $options is omitted, it returns the string that describes the current options. SEE ALSO
mb_split(3), mb_ereg(3), mb_eregi(3). PHP Documentation Group MB_REGEX_SET_OPTIONS(3)
All times are GMT -4. The time now is 06:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy