09-27-2010
Quote:
Originally Posted by
faizlo
All I need is to skip the string if it has any of the 2 substrings I mentioned above.
We've
told you how to look for either of those two substrings and that's somehow insufficient, so this is an insufficient explanation of the problem.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is probably pretty simple butI'm not sure how to best go about it.
If I have
FILE="myBigLongFileName_1.xls"
FILE_PREFIX=`echo $FILE| cut -d"." -f1`
# that gives "myBigLongFileName_1"
All i want to do now is chop the "_1" from the end of $FILE_PREFIX
Any ideas anyone? (3 Replies)
Discussion started by: djkane
3 Replies
2. Shell Programming and Scripting
i have a strings
abc-def.csv
ghi-jkl.csv
i want to make it as
abc-*-def.xyz
ghi-*-jkl.xyz
How to do it?. (5 Replies)
Discussion started by: senthilk615
5 Replies
3. UNIX for Dummies Questions & Answers
I need to check the occurrence of one string within another.
code
********************
if ;then do something done
********************
Thanks (7 Replies)
Discussion started by: w020637
7 Replies
4. UNIX for Dummies Questions & Answers
Hi
I use the below cmd to get the list of files that are modified than <temp> file in the <path> diretory
cmd:find <path> -name '*.zip' -type f -newer <temp> -print
i am getting all the list of files that are new or modified, with abs path, i want to copy all of these files to a... (3 Replies)
Discussion started by: Naveen_5960
3 Replies
5. Shell Programming and Scripting
I have a string '<Hi>abc</Hi>"
How to print "abc" (6 Replies)
Discussion started by: sandy1028
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I hav a string lets say aa.txt:bb:txt
length of the string can vary.. I have to keep the token inside a array and the delimiter is : plz send me the code (2 Replies)
Discussion started by: Deekay.p
2 Replies
7. Shell Programming and Scripting
Hi All,
I have a ouput string likes 'u8wos' or 'u10acsd' or somthing else 'u{number}{any characters}'and I want to get the number behind the letter 'u' by bash shell.
Thanks
Damon (11 Replies)
Discussion started by: Damon_Qu
11 Replies
8. Programming
hi everyone
I have a C program where I have a line and I want to check if the line contains a string.The line is stored in a buffer.How can I do that?
Can I consider the whole line as a string and check for a substring?And if so what's the most efficient way to achieve it? (1 Reply)
Discussion started by: vlm
1 Replies
9. Shell Programming and Scripting
I want to check if the string has the substring in IF condition then process...
i tried below but not working
if ];
then
.............
field can be "reserved1" ....reservedn / fillspaces1 ... fillspacesn (4 Replies)
Discussion started by: greenworld123
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I have a process that generates strings.
I would like to check each string and search for substring which contains the letter 'E' surrounded by numbers (both sides of the letter 'E').
few examples:
AA4E7012A2 - contains E surrounded by numbers
FE18274012 - does not contain E... (3 Replies)
Discussion started by: yanive
3 Replies
LEARN ABOUT CENTOS
pcre16_get_substring_list
PCRE_GET_SUBSTRING_LIST(3) Library Functions Manual PCRE_GET_SUBSTRING_LIST(3)
NAME
PCRE - Perl-compatible regular expressions
SYNOPSIS
#include <pcre.h>
int pcre_get_substring_list(const char *subject,
int *ovector, int stringcount, const char ***listptr);
int pcre16_get_substring_list(PCRE_SPTR16 subject,
int *ovector, int stringcount, PCRE_SPTR16 **listptr);
int pcre32_get_substring_list(PCRE_SPTR32 subject,
int *ovector, int stringcount, PCRE_SPTR32 **listptr);
DESCRIPTION
This is a convenience function for extracting a list of all the captured substrings. The arguments are:
subject Subject that has been successfully matched
ovector Offset vector that pcre[16|32]_exec used
stringcount Value returned by pcre[16|32]_exec
listptr Where to put a pointer to the list
The memory in which the substrings and the list are placed is obtained by calling pcre[16|32]_malloc(). The convenience function
pcre[16|32]_free_substring_list() can be used to free it when it is no longer needed. A pointer to a list of pointers is put in the vari-
able whose address is in listptr. The list is terminated by a NULL pointer. The yield of the function is zero on success or
PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained.
There is a complete description of the PCRE native API in the pcreapi page and a description of the POSIX API in the pcreposix page.
PCRE 8.30 24 June 2012 PCRE_GET_SUBSTRING_LIST(3)