06-25-2019
You will get a better response if you provide us with more complete details or input and output and how you are calling your regex, etc.
We are really not great mind readers here.... sorry about that.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to parse RichText to XML. I want to be able to capture everything between the '/par' tag in the RTF but not include the tag itself. So far all I have is this, '.*?\\par' but it leaves '\par' at the end of it. Any suggestions? (1 Reply)
Discussion started by: AresMedia
1 Replies
2. Programming
How do I use the regular expressions in c++? (2 Replies)
Discussion started by: szzz
2 Replies
3. Shell Programming and Scripting
How can i create a regular expression which can detect a new line charcter followed by a special character say * and replace these both by a string of zero length?
Eg:
Input File san.txt
hello
hi ... (6 Replies)
Discussion started by: sandeep_hi
6 Replies
4. Shell Programming and Scripting
Hi,
can anyone advise me how to shorten this:
if || ; then
I tried but it dosent seem to work, whats the correct way.
Cheers (4 Replies)
Discussion started by: jack1981
4 Replies
5. UNIX for Advanced & Expert Users
I have a flat file with the following drug names
Nutropin AQ 20mg PEN Cart 2ml
Norditropin Cart 15mg/1.5ml
I have to extract digits that are before mg i.e 20 and 15 ; how to do this using regular expressions
Thanks
ram (1 Reply)
Discussion started by: ramky79
1 Replies
6. Shell Programming and Scripting
#!/usr/bin/perl
$word = "one last challenge";
if ( $word =~ /^(\w+).*\s(\w+)$/ )
{
print "$1";
print "\n";
print "$2";
}
The output shows that "$1" is with result one and "$2" is with result challenge. I am confused about how this pattern match expression works step by step. I... (8 Replies)
Discussion started by: DavidHe
8 Replies
7. Shell Programming and Scripting
what elements does " /^/ " match?
I did the test which indicates that it matches single lowercase character like 'a','b' etc. and '1','2' etc.
But I really confused with that. Because, "/^abc/" matches strings like "abcedf" or "abcddddee".
So, what does caret ^ really mean?
Any response... (2 Replies)
Discussion started by: DavidHe
2 Replies
8. Shell Programming and Scripting
I have a file that I'm trying to find all the cases of phone number extensions and deleting them. So input file looks like:
abc
x93825
def
13234
x52673
hello
output looks like:
abc
def
13234
hello
Basically delete lines that have 5 numbers following "x". I tried: x\(4) but it... (7 Replies)
Discussion started by: pxalpine
7 Replies
9. Shell Programming and Scripting
I am new to shell scripts.Can u please help me on this req.
test_user = "Arun"
if
echo "test_user is a word"
else
echo "test_user is not a word" (1 Reply)
Discussion started by: chandrababu
1 Replies
10. Shell Programming and Scripting
Hi
Ilove unix and alwyas trying to to learn unix,but i am weak in using regular expressions.can you please give me a littel brief discription that how can i understand them and how to use .your response could lead a great hand in my unix love. (1 Reply)
Discussion started by: manoj attri
1 Replies
LEARN ABOUT DEBIAN
ares_process
ARES_PROCESS(3) Library Functions Manual ARES_PROCESS(3)
NAME
ares_process - Process events for name resolution
SYNOPSIS
#include <ares.h>
void ares_process(ares_channel channel, fd_set *read_fds,
fd_set *write_fds)
void ares_process_fd(ares_channel channel, ares_socket_t read_fd, ares_socket_t write_fd)
DESCRIPTION
The ares_process(3) function handles input/output events and timeouts associated with queries pending on the name service channel identi-
fied by channel. The file descriptor sets pointed to by read_fds and write_fds should have file descriptors set in them according to
whether the file descriptors specified by ares_fds(3) are ready for reading and writing. (The easiest way to determine this information is
to invoke select with a timeout no greater than the timeout given by ares_timeout(3) ).
The ares_process function will invoke callbacks for pending queries if they complete successfully or fail.
ares_process_fd(3) works the same way but acts and operates only on the specific file descriptors (sockets) you pass in to the function.
Use ARES_SOCKET_BAD for "no action". This function is of course provided to allow users of c-ares to void select() in their applications
and within c-ares.
EXAMPLE
The following code fragment waits for all pending queries on a channel to complete:
int nfds, count;
fd_set readers, writers;
struct timeval tv, *tvp;
while (1)
{
FD_ZERO(&readers);
FD_ZERO(&writers);
nfds = ares_fds(channel, &readers, &writers);
if (nfds == 0)
break;
tvp = ares_timeout(channel, NULL, &tv);
count = select(nfds, &readers, &writers, NULL, tvp);
ares_process(channel, &readers, &writers);
}
SEE ALSO
ares_fds(3), ares_timeout(3)
AUTHOR
Greg Hudson, MIT Information Systems
Copyright 1998 by the Massachusetts Institute of Technology.
25 July 1998 ARES_PROCESS(3)