Sponsored Content
Full Discussion: REGEX code help
Top Forums Programming REGEX code help Post 302421556 by fed.linuxgossip on Friday 14th of May 2010 06:03:01 PM
Old 05-14-2010
thanks for giving it a shot, but it did not work as expected.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a regex

Hi, I am trying to grep for the following type of string from a document given below: 12637 1239 3356 12956 7004 7004 7004 13381 13381 *> 12.0.1.63 0 7018 21872 ? * 208.51.134.254 53 0 3549 7018 21872 ?... (1 Reply)
Discussion started by: Legend986
1 Replies

2. Shell Programming and Scripting

Regex

How do I write a regular expression to capture the comments of Pascal which are usually delimted by (* and *) or { and }? And also I need a regular expression to express financial quantities in American Notation. They have a leading dollar sign and an optional string of asteriks,a string of decimal... (1 Reply)
Discussion started by: saikrishnan7
1 Replies

3. Shell Programming and Scripting

regex help

I would like to search strings composed by only one type of charachter for example only strings composed by the charachter 'b' is it right? $egrep '\<(b+)+\>' filename Could be there some side effects? Regards. (1 Reply)
Discussion started by: and77
1 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. Shell Programming and Scripting

regex in ls

Hi Experts, I am using ls with regex in the below manner: VAR="*.txt *.TXT" ls -l $VAR This is working fine if I have both txt and TXT extension files in my directory. But if any of them is not present, its throwing errors, that *.TXT file not found in the directory. So what am i missing... (6 Replies)
Discussion started by: sugarcane
6 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

Help with REGEX??

i have a file 1.txt. the file contains: * server1.com : ewf,wefwef,wef,wef ------------------------------------- * server2.com : ewf,wefwef,wef,wef ------------------------------------- * server3.com : ewf,wefwef,wef,wef ------------------------------------- how can i read * ? from the... (2 Replies)
Discussion started by: zigizag
2 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

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

10. Programming

Regex

I dabbled with regex a few years back and failed miserably. I am trying to do two things, and dont know where to start. Heres my examples 1) Code Code CODERS should be Code Code Coders 2) Code Code CODERSFunny should be (3 Replies)
Discussion started by: jeffs42885
3 Replies
QTimer(3qt)															       QTimer(3qt)

NAME
QTimer - Timer signals and single-shot timers SYNOPSIS
#include <qtimer.h> Inherits QObject. Public Members QTimer ( QObject * parent = 0, const char * name = 0 ) ~QTimer () bool isActive () const int start ( int msec, bool sshot = FALSE ) void changeInterval ( int msec ) void stop () int timerId () const Signals void timeout () Static Public Members void singleShot ( int msec, QObject * receiver, const char * member ) DESCRIPTION
The QTimer class provides timer signals and single-shot timers. It uses timer events internally to provide a more versatile timer. QTimer is very easy to use: create a QTimer, call start() to start it and connect its timeout() to the appropriate slots. When the time is up it will emit the timeout() signal. Note that a QTimer object is destroyed automatically when its parent object is destroyed. Example: QTimer *timer = new QTimer( myObject ); connect( timer, SIGNAL(timeout()), myObject, SLOT(timerDone()) ); timer->start( 2000, TRUE ); // 2 seconds single-shot timer You can also use the static singleShot() function to create a single shot timer. As a special case, a QTimer with timeout 0 times out as soon as all the events in the window system's event queue have been processed. This can be used to do heavy work while providing a snappy user interface: QTimer *t = new QTimer( myObject ); connect( t, SIGNAL(timeout()), SLOT(processOneThing()) ); t->start( 0, FALSE ); myObject->processOneThing() will be called repeatedly and should return quickly (typically after processing one data item) so that Qt can deliver events to widgets and stop the timer as soon as it has done all its work. This is the traditional way of implementing heavy work in GUI applications; multi-threading is now becoming available on more and more platforms, and we expect that null events will eventually be replaced by threading. Note that QTimer's accuracy depends on the underlying operating system and hardware. Most platforms support an accuracy of 20ms; some provide more. If Qt is unable to deliver the requested number of timer clicks, it will silently discard some. An alternative to using QTimer is to call QObject::startTimer() for your object and reimplement the QObject::timerEvent() event handler in your class (which must, of course, inherit QObject). The disadvantage is that timerEvent() does not support such high-level features as single-shot timers or signals. Some operating systems limit the number of timers that may be used; Qt tries to work around these limitations. See also Event Classes and Time and Date. MEMBER FUNCTION DOCUMENTATION
QTimer::QTimer ( QObject * parent = 0, const char * name = 0 ) Constructs a timer called name, with the parent parent. Note that the parent object's destructor will destroy this timer object. QTimer::~QTimer () Destroys the timer. void QTimer::changeInterval ( int msec ) Changes the timeout interval to msec milliseconds. If the timer signal is pending, it will be stopped and restarted; otherwise it will be started. See also start() and isActive(). bool QTimer::isActive () const Returns TRUE if the timer is running (pending); otherwise returns FALSE. Example: t11/cannon.cpp. void QTimer::singleShot ( int msec, QObject * receiver, const char * member ) [static] This static function calls a slot after a given time interval. It is very convenient to use this function because you do not need to bother with a timerEvent or to create a local QTimer object. Example: #include <qapplication.h> #include <qtimer.h> int main( int argc, char **argv ) { QApplication a( argc, argv ); QTimer::singleShot( 10*60*1000, &a, SLOT(quit()) ); ... // create and show your widgets return a.exec(); } This sample program automatically terminates after 10 minutes (i.e. 600000 milliseconds). The receiver is the receiving object and the member is the slot. The time interval is msec. int QTimer::start ( int msec, bool sshot = FALSE ) Starts the timer with a msec milliseconds timeout, and returns the ID of the timer, or zero when starting the timer failed. If sshot is TRUE, the timer will be activated only once; otherwise it will continue until it is stopped. Any pending timer will be stopped. See also singleShot(), stop(), changeInterval(), and isActive(). Examples: void QTimer::stop () Stops the timer. See also start(). Examples: void QTimer::timeout () [signal] This signal is emitted when the timer is activated. Examples: int QTimer::timerId () const Returns the ID of the timer if the timer is running; otherwise returns -1. SEE ALSO
http://doc.trolltech.com/qtimer.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qtimer.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QTimer(3qt)
All times are GMT -4. The time now is 02:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy