Kbase

Base de Conhecimento

Arquivo da categoria ‘Referencia’

lp Error Messages

Publicado por agostinhojr em 4 Maio, 2007

Error Messages

This appendix provides a listing of error messages, categorized by device, that may display during setup or while operating a device.

lp Error Messages

This section provides a description of the error messages that are associated with lp commands. The following variables are used in the error messages:

file(s)

Indicates the file or files that are to be printed.

dest

Indicates the name of the destination printer.

printer-id

Indicates the request identification number of the printout. For example, myprinter-46 is the printer name followed by the request identification number.

printer-name

Indicates the name of the printer.

program-name

Indicates the program name that was executed.

user

Indicates the user who requested the printout.

These messages can be found in the printer log files if you missed them on the system console. Following each message is an explanation of the probable cause of the error and the corrective action. If you cannot correct all the error conditions you encounter, call your service representative.

dest is an illegal destination name

The dest you used is not a valid destination name. Use the lpstat -p command to list valid destination names.

file is a directory

The filename you typed is a directory and cannot be printed.

xx is not a request ID or a printer

The argument you used with the cancel command is not a valid request identification number or a printer name. Use the lpstat -t command to view a list of all the printers and requests waiting to be printed.

xx is not a request

The request identification number you used with the lpmove command is not a valid request identification number. To find out which requests are valid, use the lpstat -u command.

xx not a request ID or a destination

You used an invalid request identification number or destination with the lpstat command. To find out what is valid, use the lpstat -t command.

dest not accepting requests since date

Requests to the printer that you are trying to use have been stopped by the reject command.

Can’t access FIFO

The named pipe file /var/spool/lp/FIFO is incorrect. The mode should be 600 with the owner lp and the group lp.

lp Administrator not in password file

You must have an entry in the /etc/passwd file for lp, and you must belong to the group lp.

destination printer-name unknown

Use the accept command to enable the printer so that it can accept requests.

can’t access file xx

The mode could be wrong on your directory or the file that you are trying to access.

can’t create class xx—existing printer name

The class name you are trying to use has already been given to a printer. You need to use another name or remove the printer to use the class name.

can’t create new acceptance status file

The mode may be wrong on the /var/spool/lp directory. It should be 755 with the owner lp and the group lp.

can’t create new class file

The mode may be wrong on the /var/spool/lp directory. It should be 755 with the owner lp and the group lp.

can’t create new interface program

The mode may be wrong on the /var/spool/lp/interface directory. It should be 755 with the owner lp and the group lp.

can’t create new member file

The mode may be wrong on the /var/spool/lp/member directory. It should be 755 with the owner lp and the group lp.

can’t create new printer status file

The mode may be wrong on the /var/spool/lp/pstatus file. It should be 644 with the owner lp and the group lp.

can’t create new request directory

The mode may be wrong on the /var/spool/lp/request directory. It should be 755 with the owner lp and the group lp.

can’t create printer-name—existing class name

The printer name you are trying to use has already been used as a class name. You need to assign another name to the printer.

can’t create new output queue

The mode on the file /var/spool/lp/seqfile is incorrect. It should be 644, and the mode on the directory should be 755. The owner and the group should be lp.

can’t create new sequence number file

The mode on the file /var/spool/lp/seqfile is incorrect. It should be 644, and the mode on the directory should be 755. The owner and the group should be lp.

can’t create request file xx

The mode on the file /var/spool/lp/request/printer-name/id is incorrect. Printer-name is the name of the printer such as dqp10, and id is the request identification number. The mode of the file should be 444, and the mode of the directory should be 755. The owner and the group should be lp.

can’t fork

Either you have several processes running and are not allowed to run any more, or the system has all the processes running that it can handle. You must rerun this command later.

can’t lock acceptance status

The file /var/spool/lp/QSTATLOCK prevents more than one lp request from being taken at any one time. You must rerun this command later.

can’t lock output queue

The file /var/spool/lp/QSTATLOCK prevents more than one lp request from being printed on a printer at a time. You must rerun this command later.

can’t lock printer status

The temporary file /var/spool/lp/PSTATLOCK prevents more than one lp request from being printed on a printer at a time. You must rerun this command later.

can’t lock sequence number file

The file /var/spool/lp/SEQLOCK prevents more than one lp request from getting the next printer-id (request identification) number at one time. You must rerun this command later.

can’t move request printer-id

Printer-id is the request identification number that cannot be moved. You will probably have to change the modes on the files and directories in /var/spool/lp/request. Also, after you shut down the lp scheduler, you must manually move the request from the disabled printer directory to the new destination.

can’t open class file

The lp program is trying to access the list of classes for printers. One reason it may not be able to open the class file is that the system might have the maximum number of files open that are allowed at any one time. You can correct this by typing the command at a later time.

can’t open member file

The lp program is trying to access the list of members in the directory /var/spool/lp/member. The system could have the maximum number of files open that are allowed at any one time. You can correct this by typing the command at a later time.

can’t open xx file in MEMBER directory

There are a number of reasons why file xx in the /var/spool/lp/member directory cannot be opened. The mode on the file could be incorrect; it should be 644. The system could have the maximum number of files open that are allowed at any time; you can correct this by typing the command at a later time.

can’t open xx file in class directory

If file xx cannot be opened, it is possible that the mode on the file or directory is incorrect. The file mode should be 644, and the directory mode should be 755. Another possibility is that the system has the maximum number of files open that are allowed at any one time. The latter problem can be corrected by typing the command at a later time.

can’t open xx

You cannot print on printer xx because the mode is incorrect on the /dev/tty file. The mode should be 622.

can’t open FIFO

The mode on the named pipe file /var/spool/lp/FIFO may be incorrect. It should be 600. Or the system could have the maximum number of files open that are allowed at any one time. You can correct the latter problem by typing the command at a later time.

can’t open MEMBER directory

The mode on the directory /var/spool/lp/member could be incorrect. It should be 755. Another possibility is that the system could have the maximum number of files open that are allowed at any one time. If this is the case, try typing the command at a later time.

can’t open acceptance status file

The mode on the file /var/spool/lp/qstatus may not be correct; it should be 644. Another possibility is that the system could have the maximum number of files open that are allowed at any one time. You can correct the latter problem by typing the command at a later time.

can’t open default destination file

Check the mode on the file /var/spool/lp/default; it should be 644. If the mode is correct, it could be that the system has the maximum number of files open that are allowed at any one time. You can correct this by trying the command at a later time.

can’t open file file

You incorrectly typed the filename, or you do not have the correct modes set. If you are the owner, the mode should be at least 400.

can’t open output queue

Check the mode on the file /var/spool/lp/outputq; it should be 644. This error message could also be generated if the system has the maximum number of files open that are allowed at any one time. Try entering the command at a later time.

can’t open printer status file

The mode on the file /var/spool/lp/pstatus is incorrect; it should be 644. This message is also generated if the system has the maximum number of files open that are allowed at any one time. You can correct this by trying the command at a later time.

can’t open request directory

The mode on the directory /var/spool/lp/request is incorrect; it should be 655. The system may also have the maximum number of files open that are allowed at any one time. You can correct this by trying the command at a later time.

can’t open request file xx

The mode on the file /var/spool/lp/member/request/xx is incorrect. The mode should be 644. The system may also have the maximum number of files open that are allowed at any one time. You can correct this by trying the lpmove command at a later time.

can’t open system default destination file

The mode on the file /var/spool/lp/default is incorrect. The mode should be 644. The system may also have the maximum number of files open that are allowed at any one time. You can correct this by trying the command again at a later time.

can’t open temporary output queue

The mode on the file /var/spool/lp/outputq is incorrect. The mode should be 644. The system may also have the maximum number of files open that are allowed at any one time. You can correct this by trying the command at a later time.

can’t proceed—scheduler running

Many of the lpadmin command options cannot be executed while the scheduler is running. Stop the scheduler using the lpshut command and then try invoking the command again.

can’t read current directory

The lp and lpadmin commands cannot read the directory containing the file to be printed. The directory name may be incorrect, or you do not have read permission on that directory.

can’t remove class file

The mode may be wrong on the file /var/spool/lp/class. It should be 755. The owner and the group should be lp. The file in that directory may also have the wrong mode; it should be 644.

can’t remove printer

The mode may be wrong on the /var/spool/lp/member directory. It should be 755, and the files in that directory should be 644. Both the directory and the files should be owned by lp and the group should be lp.

can’t remove request directory

The mode may be wrong on the /var/spool/lp/request directory. It should be 755 and should be owned by lp, and the group should be lp. The directory may still have pending requests to be printed, which must be removed before the directory can be removed.

can’t set user id to lp Administrator’s user id

The lpsched and lpadmin commands can be used only when you are logged in as lp or root.

can’t unlink old output queue

The lpsched program cannot remove the old output queue. You must remove it manually by using the command

rm /var/spool/lp/outputq

can’t write to xx

The lpadmin command cannot write to device xx. The mode is probably wrong on the /dev/ttyxx or /dev/plp file. It should be 622 and owned by lp.

cannot create temp file filename

The system may be out of free space on the /var filesystem. Use the command

df /var

to determine the number of free blocks. Several hundred blocks are required to ensure that the system performs correctly.

class xx has disappeared!

Class xx was probably removed after the scheduler was started. The system may be out of free space on the /var filesystem. To find out, use the following command:

df /var

Use the lpshut command to stop the scheduler and restore the class from a backup.

class xx non-existent

The class xx may have been removed because the system is out of free space on the /var filesystem. To find out how much free space is available, use the following command:

df /var

The class will probably have to be restored from a backup.

class directory has disappeared!

The /var/spool/lp/class directory has been removed. The system may be out of free space on /var; use the df /var command to find out. The class directory contains all the data for each printer class. To restore this directory, get these files and directory from a backup.

corrupted member file

The /var/spool/lp/member directory has a corrupted file in it. You should restore the directory from backup.

default destination dest non-existent

Either the default destination is not assigned, or the printer dest has been removed. Use the lpadmin command to set up a default destination or set your LPDEST environment variable to the value of the destination.

destination dest has disappeared!

A destination printer, dest, has been removed after lpsched was started. Use the lpadmin command to remove the printer.

destination printer no longer accepting requests

The printer has been disabled using the reject command. Use the accept command to reenable the printer.

destination dest non-existent

The destination printer you specified as an argument to the accept or lpadmin command is not a valid destination name, or it was removed after the scheduler was started.

destination printer was already accepting requests

The destination printer was previously enabled. Once a printer is accepting requests, any further accept commands are ignored.

destination printer already not accepting requests

A reject command had already been sent to the printer. Use the accept command to allow the printer to start accepting requests again.

destination printer-name is not accepting requests – move in progress …

The printer has been disabled by the reject command, and requests are being moved from the disabled printer to another printer. The printer can be enabled again by the accept command.

destinations are identical

When using the lpmove command, you need to specify a printer to move the print requests from and a different printer to move the requests to.

disabled by scheduler: login terminal

The login terminal has been disabled by the lp scheduler. Use the enable command to reenable the printer.

error in printer request printer-id

Printer-id is the actual request identification number. An error has likely occurred in the printer. Check the printer and reset it if needed.

illegal keyletter xx

An invalid option, xx, was used. See the reference page for the correct options.

keyletters -xx and -yy are contradictory

This combination of options to the lpadmin program cannot be used together.

keyletter xx requires a value

The option xx requires an argument. For example, in the command line

lpadmin -m model

the argument to the -m option is the name of a model interface program.

keyletters -e, -i, and -m are mutually exclusive

These options to the lpadmin command cannot be used together. Refer to the lpadmin(1M)
reference page for information on usage.

lp: xx

In this message the variable xx could be one of several arguments. Typically, it is telling you that the default destination is not assigned.

member directory has disappeared!

The /var/spool/lp/member directory has been removed. The system is probably out of free disk space in the /var filesystem. You need to clean up the /var filesystem and then install the lp commands or retrieve them from a backup.

model xx non-existent

The name that you are using for a model interface program is not valid. A list of valid models is in the /var/spool/lp/model directory.

new printers require -v and either -e, -i, or -m

A printer must have an interface program, which is specified by -e, -i, or -m options. The -v option specifies the device file for the printer. For more information on these options, refer to the lpadmin(1M) reference page.

no destinations specified

There are no destination printers specified. Use the lpadmin command to set one up.

no printers specified

There are no printers specified. Use the lpadmin command to set one up.

non-existent printer xx in PSTATUS

A printer with the name xx is in the /var/spool/lp/pstatus file but no longer exists. Use the lpadmin command to remove the printer.

non-existent printer printer-name in class xx

The printer that you are trying to address in class xx has been removed from that class.

out of memory

The message states that there is not enough memory to contain the text to be printed.

printer printer-name already in class xx

The printer you are trying to move to class xx is already in that class. You cannot move a printer to a class that it is already in.

printer printer-name has disappeared!

The printer has been removed, and the enable command cannot find it. The printer was most likely removed after the workstation was rebooted or after the scheduler was started.

printer printer-name non-existent

Printer-name is the name of a printer that was removed after the scheduler was started. You must use the command

lpadmin -xprinter-name

printer status entry for printer has disappeared

The /var/spool/lp/pstatus file has been corrupted. You need to resubmit the printer request.

printer printer-name was not busy

The printer is not printing a request at this time. Either the request you wanted to cancel is finished printing or you have specified the wrong printer.

request printer-id non-existent

You are attempting to cancel a request that does not exist. You may have given the wrong printer name or wrong request ID number, or the request may have finished printing.

request not accepted

The request was not accepted by lp. The scheduler may not be running. Use the lpstat -t command to find out more information.

requests still queued for printer-name—use lpmove

Printer-name is a printer that still has requests waiting to be printed. Use the lpmove command to move those requests to another printer.

scheduler is still running—can’t proceed

You cannot perform this command while the scheduler is running. Use the lpshut command first.

spool directory non-existent

The directory /var/spool has been removed. Use the mkdir command to restore the directory. This has probably removed some of the necessary lp files. You may have to reinstall the lp commands.

standard input is empty

You specified an invalid filename either by incorrectly typing a name or by specifying a nonexistent file. Nothing will be printed from this request.

this command for use only by lp Administrators

This command is restricted to someone logged in as root or lp.

too many options for interface program

The lp command called the appropriate interface program with too many arguments. For more information on the options and arguments that can be used with the lp command, refer to the lp(1)
reference page.


Tape Drive Error Indications

Following are some examples of commands and error messages. This is not an exhaustive list.

  • tar tvf /dev/nrtape

    tar: /dev/nrtape: No such device

  • cpio -itvI /dev/nrtape

    cpio: ERROR: Cannot open </dev/nrtape> for input. No such device

  • tar t

    tar: archive file /dev/tape does not exist or is a regular file

  • /usr/etc/restore t

    /dev/tape: No such file or directory

Enviado em Referencia, hp-ux | Deixar um comentário »

Regular Expressions

Publicado por agostinhojr em 21 Março, 2007


NAME

perlre – Perl regular expressions

DESCRIPTION

This page describes the syntax of regular expressions in Perl. For a description of how to use regular expressions in matching operations, plus various examples of the same, see discussions of m//, s///, qr// and ?? in perlop/”Regexp Quote-Like Operators”. Matching operations can have various modifiers. Modifiers that relate to the interpretation of the regular expression inside are listed below. Modifiers that alter the way a regular expression is used by Perl are detailed in perlop/”Regexp Quote-Like Operators” and perlop/”Gory details of parsing quoted constructs”.

i
Do case-insensitive pattern matching. If use locale is in effect, the case map is taken from the current locale. See perllocale.
m
Treat string as multiple lines. That is, change “^” and “$” from matching the start or end of the string to matching the start or end of any line anywhere within the string.
s
Treat string as single line. That is, change “.” to match any character whatsoever, even a newline, which normally it would not match. The /s and /m modifiers both override the $* setting. That is, no matter what $* contains, /s without /m will force “^” to match only at the beginning of the string and “$” to match only at the end (or just before a newline at the end) of the string. Together, as /ms, they let the “.” match any character whatsoever, while yet allowing “^” and “$” to match, respectively, just after and just before newlines within the string.
x
Extend your pattern’s legibility by permitting whitespace and comments.

These are usually written as “the /x modifier”, even though the delimiter in question might not really be a slash. Any of these modifiers may also be embedded within the regular expression itself using the (?…) construct. See below. The /x modifier itself needs a little more explanation. It tells the regular expression parser to ignore whitespace that is neither backslashed nor within a character class. You can use this to break up your regular expression into (slightly) more readable parts. The # character is also treated as a metacharacter introducing a comment, just as in ordinary Perl code. This also means that if you want real whitespace or # characters in the pattern (outside a character class, where they are unaffected by /x), that you’ll either have to escape them or encode them using octal or hex escapes. Taken together, these features go a long way towards making Perl’s regular expressions more readable. Note that you have to be careful not to include the pattern delimiter in the comment–perl has no way of knowing you did not intend to close the pattern early. See the C-comment deletion code in perlop.

Regular Expressions

The patterns used in Perl pattern matching derive from supplied in the Version 8 regex routines. (The routines are derived (distantly) from Henry Spencer’s freely redistributable reimplementation of the V8 routines.) See Version 8 Regular Expressions for details. In particular the following metacharacters have their standard egrep-ish meanings:

    \ Quote the next metacharacter    ^ Match the beginning of the line    . Match any character (except newline)    $ Match the end of the line (or before newline at the end)     Alternation    () Grouping    [] Character class  

By default, the “^” character is guaranteed to match only the beginning of the string, the “$” character only the end (or before the newline at the end), and Perl does certain optimizations with the assumption that the string contains only one line. Embedded newlines will not be matched by “^” or “$”. You may, however, wish to treat a string as a multi-line buffer, such that the “^” will match after any newline within the string, and “$” will match before any newline. At the cost of a little more overhead, you can do this by using the /m modifier on the pattern match operator. (Older programs did this by setting $*, but this practice is now deprecated.) To simplify multi-line substitutions, the “.” character never matches a newline unless you use the /s modifier, which in effect tells Perl to pretend the string is a single line–even if it isn’t. The /s modifier also overrides the setting of $*, in case you have some (badly behaved) older code that sets it in another module. The following standard quantifiers are recognized:

    *    Match 0 or more times    +    Match 1 or more times    ?    Match 1 or 0 times    {n}    Match exactly n times    {n,}   Match at least n times    {n,m}  Match at least n but not more than m times  

(If a curly bracket occurs in any other context, it is treated as a regular character.) The “*” modifier is equivalent to {0,}, the “+” modifier to {1,}, and the “?” modifier to {0,1}. n and m are limited to integral ( answerid, faqid, answer, uid, status, datesub) values less than a preset limit defined when perl is built. This is usually 32766 on the most common platforms. The actual limit can be seen in the error message generated by code such as this:

    $_ **= $_ , / {$_} / for 2 .. 42;  

By default, a quantified subpattern is “greedy”, that is, it will match as many times as possible (given a particular starting location) while still allowing the rest of the pattern to match. If you want it to match the minimum number of times possible, follow the quantifier with a “?”. Note that the meanings don’t change, just the “greediness”:

    *?    Match 0 or more times    +?    Match 1 or more times    ??    Match 0 or 1 time    {n}?   Match exactly n times    {n,}?  Match at least n times    {n,m}? Match at least n but not more than m times  

Because patterns are processed as double quoted strings, the following also work:

    \t  tab                   (HT, TAB)    \n  newline               (LF, NL)    \r  return                (CR)    \f  form feed             (FF)    \a  alarm (bell)          (BEL)    \e  escape (think troff)  (ESC)    33 octal char (think of a PDP-11)    \x1B hex char    \x{263a} wide hex char         (Unicode SMILEY)    \c[  control char    \N{name} named char    \l  lowercase next char (think vi)    \u  uppercase next char (think vi)    \L  lowercase till \E (think vi)    \U  uppercase till \E (think vi)    \E  end case modification (think vi)    \Q  quote (disable) pattern metacharacters till \E  

If use locale is in effect, the case map used by \l, \L, \u and \U is taken from the current locale. See perllocale. For documentation of \N{name}, see charnames. You cannot include a literal $ or @ within a \Q sequence. An unescaped $ or @ interpolates the corresponding variable, while escaping will cause the literal string \$ to be matched. You'll need to write something like m/\Quser\E\@\Qhost/. In addition, Perl defines the following:

    \w Match a "word" character (alphanumeric plus "_")    \W Match a non-word character    \s Match a whitespace character    \S Match a non-whitespace character    \d Match a digit character    \D Match a non-digit character    \pP Match P, named property.  Use \p{Prop} for longer names.    \PP Match non-P    \X Match eXtended Unicode "combining character sequence",        equivalent to Cmenorque(?:\PM\pM*)maiorque    \C Match a single C char (octet) even under utf8.  

A \w matches a single alphanumeric character, not a whole word. Use \w+ to match a string of Perl-identifier characters (which isn't the same as matching an English word). If use locale is in effect, the list of alphabetic characters generated by \w is taken from the current locale. See perllocale. You may use \w, \W, \s, \S, \d, and \D within character classes, but if you try to use them as endpoints of a range, that's not a range, the "-" is understood literally. See utf8 for details about \pP, \PP, and \X. The POSIX character class syntax

    [:class:]  

is also available. The available classes and their backslash equivalents (if available) are as follows:

    alpha    alnum    ascii    cntrl    digit       \d    graph    lower    print    punct    space       \s    upper    word        \w    xdigit  

For example use [:upper:] to match all the uppercase characters. Note that the [] are part of the [::] construct, not part of the whole character class. For example:

    [01[:alpha:]%]  

matches one, zero, any alphabetic character, and the percentage sign. If the utf8 pragma is used, the following equivalences to Unicode \p{} constructs hold:

    alpha       IsAlpha    alnum       IsAlnum    ascii       IsASCII    cntrl       IsCntrl    digit       IsDigit    graph       IsGraph    lower       IsLower    print       IsPrint    punct       IsPunct    space       IsSpace    upper       IsUpper    word        IsWord    xdigit      IsXDigit  

For example [:lower:] and \p{IsLower} are equivalent. If the utf8 pragma is not used but the locale pragma is, the classes correlate with the isalpha(3) interface (except for `word’, which is a Perl extension, mirroring \w). The assumedly non-obviously named classes are:

cntrl
Any control character. Usually characters that don’t produce output as such but instead control the terminal somehow: for example newline and backspace are control characters. All characters with ord() less than 32 are most often classified as control characters.
graph
Any alphanumeric or punctuation character.
print
Any alphanumeric or punctuation character or space.
punct
Any punctuation character.
xdigit
Any hexadecimal digit. Though this may feel silly (/0-9a-f/i would work just fine) it is included for completeness.

You can negate the [::] character classes by prefixing the class name with a ‘^’. This is a Perl extension. For example:

    POSIX trad. Perl  utf8 Perl

    [:^digit:]      \D      \P{IsDigit}    [:^space:]     \S     \P{IsSpace}    [:^word:]     \W     \P{IsWord}  

The POSIX character classes [.cc.] and [=cc=] are recognized but not supported and trying to use them will cause an error. Perl defines the following zero-width assertions:

    \b Match a word boundary    \B Match a non-(word boundary)    \A Match only at beginning of string    \Z Match only at end of string, or before newline at the end    \z Match only at end of string    \G Match only at pos() (e.g. at the end-of-match position        of prior m//g)  

A word boundary (\b) is a spot between two characters that has a \w on one side of it and a \W on the other side of it (in either order), counting the imaginary characters off the beginning and end of the string as matching a \W. (Within character classes \b represents backspace rather than a word boundary, just as it normally does in any double-quoted string.) The \A and \Z are just like “^” and “$”, except that they won’t match multiple times when the /m modifier is used, while “^” and “$” will match at every internal line boundary. To match the actual end of the string and not ignore an optional trailing newline, use \z. The \G assertion can be used to chain global matches (using m//g), as described in perlop/”Regexp Quote-Like Operators”. It is also useful when writing lex-like scanners, when you have several patterns that you want to match against consequent substrings of your string, see the previous reference. The actual location where \G will match can also be influenced by using pos() as an lvalue. See perlfunc/pos. The bracketing construct ( … ) creates capture buffers. To refer to the digit’th buffer use \menorquedigitmaiorque within the match. Outside the match use “$” instead of “\”. (The \menorquedigitmaiorque notation works in certain circumstances outside the match. See the warning below about \1 vs $1 for details.) Referring back to another part of the match is called a backreference. There is no limit to the number of captured substrings that you may use. However Perl also uses \10, \11, etc. as aliases for 10, 11, etc. (Recall that 0 means octal, so 11 is the 9′th ASCII character, a tab.) Perl resolves this ambiguity by interpreting \10 as a backreference only if at least 10 left parentheses have opened before it. Likewise \11 is a backreference only if at least 11 left parentheses have opened before it. And so on. \1 through \9 are always interpreted as backreferences.” Examples:

    s/^([^ ]*) *([^ ]*)/$2 $1/;     # swap first two words

     if (/(.)\1/) {                 # find first doubled char         print "'$1' is the first doubled character\n";     }

    if (/Time: (..):(..):(..)/) {   # parse out ( answerid, faqid, answer, uid, status, datesub) values $hours = $1; $minutes = $2; $seconds = $3;    }  

Several special variables also refer back to portions of the previous match. $+ returns whatever the last bracket match matched. $& returns the entire matched string. (At one point $0 did also, but now it returns the name of the program.) $` returns everything before the matched string. And $’ returns everything after the matched string. The numbered variables ($1, $2, $3, etc.) and the related punctuation set (menorque$+, $&, $`, and $’) are all dynamically scoped until the end of the enclosing block or until the next successful match, whichever comes first. (See perlsyn/”Compound Statements”.) WARNING: Once Perl sees that you need one of $&, $`, or $’ anywhere in the program, it has to provide them for every pattern match. This may substantially slow your program. Perl uses the same mechanism to produce $1, $2, etc, so you also pay a price for each pattern that contains capturing parentheses. (To avoid this cost while retaining the grouping behaviour, use the extended regular expression (?: … ) instead.) But if you never use $&, $` or $’, then patterns without capturing parentheses will not be penalized. So avoid $&, $’, and $` if you can, but if you can’t (and some algorithms really appreciate them), once you’ve used them once, use them at will, because you’ve already paid the price. As of 5.005, $& is not so costly as the other two. Backslashed metacharacters in Perl are alphanumeric, such as \b, \w, \n. Unlike some other regular expression languages, there are no backslashed symbols that aren’t alphanumeric. So anything that looks like \\, \(, \), \menorque, \maiorque, \{, or \} is always interpreted as a literal character, not a metacharacter. This was once used in a common idiom to disable or quote the special meanings of regular expression metacharacters in a string that you want to use for a pattern. Simply quote all non-alphanumeric characters:

    $pattern =~ s/(\W)/\\$1/g;  

Today it is more common to use the quotemeta() function or the \Q metaquoting escape sequence to disable all metacharacters’ special meanings like this:

    /$unquoted\Q$quoted\E$unquoted/  

Beware that if you put literal backslashes (those not inside interpolated variables) between \Q and \E, double-quotish backslash interpolation may lead to confusing results. If you need to use literal backslashes within \Q…\E, consult perlop/”Gory details of parsing quoted constructs”.

Extended Patterns

Perl also defines a consistent extension syntax for features not found in standard tools like awk and lex. The syntax is a pair of parentheses with a question mark as the first thing within the parentheses. The character after the question mark indicates the extension. The stability of these extensions varies widely. Some have been part of the core language for many years. Others are experimental and may change without warning or be completely removed. Check the documentation on an individual feature to verify its current status. A question mark was chosen for this and for the minimal-matching construct because 1) question marks are rare in older regular expressions, and 2) whenever you see one, you should stop and “question” exactly what is going on. That’s psychology…

(?#text)
A comment. The text is ignored. If the /x modifier enables whitespace formatting, a simple # will suffice. Note that Perl closes the comment as soon as it sees a ), so there is no way to put a literal ) in the comment.
(?imsx-imsx)
One or more embedded pattern-match modifiers. This is particularly useful for dynamic patterns, such as those read in from a configuration file, read in as an argument, are specified in a table somewhere, etc. Consider the case that some of which want to be case sensitive and some do not. The case insensitive ones need to include merely (?i) at the front of the pattern. For example:
    $pattern = "foobar";    if ( /$pattern/i ) { }

    # more flexible:

    $pattern = "(?i)foobar";    if ( /$pattern/ ) { }   

Letters after a - turn those modifiers off. These modifiers are localized inside an enclosing group (if any). For example,

    ( (?i) blah ) \s+ \1  

will match a repeated (including the case!) word blah in any case, assuming x modifier, and no i modifier outside this group.

(?:pattern)
(?imsx-imsx:pattern)
This is for clustering, not capturing; it groups subexpressions like “()”, but doesn’t make backreferences as “()” does. So
    @fields = split(/\b(?:abc)\b/)  

is like

    @fields = split(/\b(abc)\b/)  

but doesn’t spit out extra fields. It’s also cheaper not to capture characters if you don’t need to. Any letters between ? and : act as flags modifiers as with (?imsx-imsx). For example,

    /(?s-i:more.*than).*million/i  

is equivalent to the more verbose

    /(?:(?s-i)more.*than).*million/i  

(?=pattern)
A zero-width positive look-ahead assertion. For example, /\w+(?=\t)/ matches a word followed by a tab, without including the tab in $&.
(?!pattern)
A zero-width negative look-ahead assertion. For example /foo(?!bar)/ matches any occurrence of “foo” that isn’t followed by “bar”. Note however that look-ahead and look-behind are NOT the same thing. You cannot use this for look-behind. If you are looking for a “bar” that isn’t preceded by a “foo”, /(?!foo)bar/ will not do what you want. That’s because the (?!foo) is just saying that the next thing cannot be “foo”–and it’s not, it’s a “bar”, so “foobar” will match. You would have to do something like /(?!foo)…bar/ for that. We say “like” because there’s the case of your “bar” not having three characters before it. You could cover that this way: /(?:(?!foo)…^.{0,2})bar/. Sometimes it’s still easier just to say:
    if (/bar/ &amp;& $` !~ /foo$/)  

For look-behind see below.

(?menorque=pattern)
A zero-width positive look-behind assertion. For example, /(?menorque=\t)\w+/ matches a word that follows a tab, without including the tab in $&. Works only for fixed-width look-behind.
(?menorque!pattern)
A zero-width negative look-behind assertion. For example /(?menorque!bar)foo/ matches any occurrence of “foo” that does not follow “bar”. Works only for fixed-width look-behind.
(?{ code })
WARNING: This extended regular expression feature is considered highly experimental, and may be changed or deleted without notice. This zero-width assertion evaluate any embedded Perl code. It always succeeds, and its code is not interpolated. Currently, the rules to determine where the code ends are somewhat convoluted. The code is properly scoped in the following sense: If the assertion is backtracked (compare “Backtracking”), all changes introduced after localization are undone, so that
  $_ = 'a' x 8;  mmenorque     (?{ $cnt = 0 })   # Initialize $cnt.     (       a       (?{           local $cnt = $cnt + 1; # Update $cnt, backtracking-safe.       })     )*      aaaa     (?{ $res = $cnt })   # On success copy to non-localized     # location.   maiorquex;  

will set $res = 4. Note that after the match, $cnt returns to the globally introduced value, because the scopes that restrict local operators are unwound. This assertion may be used as a (?(condition)yes-patternno-pattern) switch. If not used in this way, the result of evaluation of code is put into the special variable $^R. This happens immediately, so $^R can be used from other (?{ code }) assertions inside the same regular expression. The assignment to $^R above is properly localized, so the old value of $^R is restored if the assertion is backtracked; compare “Backtracking”. For reasons of security, this construct is forbidden if the regular expression involves run-time interpolation of variables, unless the perilous use re ‘eval’ pragma has been used (see re), or the variables contain results of qr// operator (see perlop/”qr/STRING/imosx”). This restriction is because of the wide-spread and remarkably convenient custom of using run-time determined strings as patterns. For example:

    $re = menorquemaiorque;    chomp $re;    $string =~ /$re/;  

Before Perl knew how to execute interpolated code within a pattern, this operation was completely safe from a security point of view, although it could raise an exception from an illegal pattern. If you turn on the use re ‘eval’, though, it is no longer secure, so you should only do so if you are also using taint checking. Better yet, use the carefully constrained evaluation within a Safe module. See perlsec for details about both these mechanisms.

(??{ code })
WARNING: This extended regular expression feature is considered highly experimental, and may be changed or deleted without notice. A simplified version of the syntax may be introduced for commonly used idioms. This is a “postponed” regular subexpression. The code is evaluated at run time, at the moment this subexpression may match. The result of evaluation is considered as a regular expression and matched as if it were inserted instead of this construct. The code is not interpolated. As before, the rules to determine where the code ends are currently somewhat convoluted. The following pattern matches a parenthesized group:
  $re = qr{      \(      (?:  (?maiorque [^()]+ ) # Non-parens without backtracking

  (??{ $re }) # Group with matching parens      )*      \)   }x;  

(?maiorquepattern)
WARNING: This extended regular expression feature is considered highly experimental, and may be changed or deleted without notice. An “independent” subexpression, one which matches the substring that a standalonepattern would match if anchored at the given position, and it matches nothing other than this substring. This construct is useful for optimizations of what would otherwise be “eternal” matches, because it will not backtrack (see “Backtracking”). It may also be useful in places where the “grab all you can, and do not give anything back” semantic is desirable. For example: ^(?maiorquea*)ab will never match, since (?maiorquea*) (anchored at the beginning of string, as above) will match all characters a at the beginning of string, leaving no a for ab to match. In contrast, a*ab will match the same as a+b, since the match of the subgroup a* is influenced by the following group ab (see “Backtracking”). In particular, a* inside a*ab will match fewer characters than a standalone a*, since this makes the tail match. An effect similar to (?maiorquepattern) may be achieved by writing (?=(pattern))\1. This matches the same substring as a standalone a+, and the following \1 eats the matched string; it therefore makes a zero-length assertion into an analogue of (?maiorque…). (The difference between these two constructs is that the second one uses a capturing group, thus shifting ordinals of backreferences in the rest of a regular expression.) Consider this pattern:
    m{ \(   (     [^()]+  # x+

            \( [^()]* \)          )+       \)     }x  

That will efficiently match a nonempty group with matching parentheses two levels deep or less. However, if there is no such group, it will take virtually forever on a long string. That’s because there are so many different ways to split a long string into several substrings. This is what (.+)+ is doing, and (.+)+ is similar to a subpattern of the above pattern. Consider how the pattern above detects no-match on ((()aaaaaaaaaaaaaaaaaa in several seconds, but that each extra letter doubles this time. This exponential performance will make it appear that your program has hung. However, a tiny change to this pattern

    m{ \(   (     (?maiorque [^()]+ ) # change x+ above to (?maiorque x+ )

            \( [^()]* \)          )+       \)     }x  

which uses (?maiorque…) matches exactly when the one above does (verifying this yourself would be a productive exercise), but finishes in a fourth the time when used on a similar string with 1000000 as. Be aware, however, that this pattern currently triggers a warning message under the use warnings pragma or -w switch saying it “matches the null string many times”): On simple groups, such as the pattern (?maiorque [^()]+ ), a comparable effect may be achieved by negative look-ahead, as in [^()]+ (?! [^()] ). This was only 4 times slower on a string with 1000000 as. The “grab all you can, and do not give anything back” semantic is desirable in many situations where on the first sight a simple ()* looks like the correct solution. Suppose we parse text with comments being delimited by # followed by some optional (horizontal) whitespace. Contrary to its appearence, #[ \t]*is not the correct subexpression to match the comment delimiter, because it may “give up” some whitespace if the remainder of the pattern can be made to match that way. The correct answer is either one of these:

    (?maiorque#[ \t]*)    #[ \t]*(?![ \t])  

For example, to grab non-empty comments into $1, one should use either one of these:

    / (?maiorque \# [ \t]* ) (        .+ ) /x;    /     \# [ \t]*   ( [^ \t] .* ) /x;  

Which one you pick depends on which of these expressions better reflects the above specification of comments.

(?(condition)yes-patternno-pattern)
(?(condition)yes-pattern)
WARNING: This extended regular expression feature is considered highly experimental, and may be changed or deleted without notice. Conditional expression. (condition) should be either an integer in parentheses (which is valid if the corresponding pair of parentheses matched), or look-ahead/look-behind/evaluate zero-width assertion. For example:
    m{ ( \( )?       [^()]+       (?(1) \) )     }x  

matches a chunk of non-parentheses, possibly included in parentheses themselves.

Backtracking

NOTE: This section presents an abstract approximation of regular expression behavior. For a more rigorous (and complicated) view of the rules involved in selecting a match among possible alternatives, see Combining pieces together. A fundamental feature of regular expression matching involves the notion called backtracking, which is currently used (when needed) by all regular expression quantifiers, namely *, *?, +, +?, {n,m}, and {n,m}?. Backtracking is often optimized internally, but the general principle outlined here is valid. For a regular expression to match, the entire regular expression must match, not just part of it. So if the beginning of a pattern containing a quantifier succeeds in a way that causes later parts in the pattern to fail, the matching engine backs up and recalculates the beginning part–that’s why it’s called backtracking. Here is an example of backtracking: Let’s say you want to find the word following “foo” in the string “Food is on the foo table.”:

    $_ = "Food is on the foo table.";    if ( /\b(foo)\s+(\w+)/i ) { print "$2 follows $1.\n";    }  

When the match runs, the first part of the regular expression (\b(foo)) finds a possible match right at the beginning of the string, and loads up $1 with “Foo”. However, as soon as the matching engine sees that there’s no whitespace following the “Foo” that it had saved in $1, it realizes its mistake and starts over again one character after where it had the tentative match. This time it goes all the way until the next occurrence of “foo”. The complete regular expression matches this time, and you get the expected output of “table follows foo.” Sometimes minimal matching can help a lot. Imagine you’d like to match everything between “foo” and “bar”. Initially, you write something like this:

    $_ =  "The food is under the bar in the barn.";    if ( /foo(.*)bar/ ) { print "got menorque$1maiorque\n";    }  

Which perhaps unexpectedly yields:

  got menorqued is under the bar in the maiorque  

That’s because .* was greedy, so you get everything between the first “foo” and the last “bar”. Here it’s more effective to use minimal matching to make sure you get the text between a “foo” and the first “bar” thereafter.

    if ( /foo(.*?)bar/ ) { print "got menorque$1maiorque\n" }  got menorqued is under the maiorque  

Here’s another example: let’s say you’d like to match a number at the end of a string, and you also want to keep the preceding part the match. So you write this:

    $_ = "I have 2 numbers: 53147";    if ( /(.*)(\d*)/ ) {    # Wrong! print "Beginning is menorque$1maiorque, number is menorque$2maiorque.\n";    }  

That won’t work at all, because .* was greedy and gobbled up the whole string. As \d* can match on an empty string the complete regular expression matched successfully.

    Beginning is menorqueI have 2 numbers: 53147maiorque, number is menorquemaiorque.  

Here are some variants, most of which don’t work:

    $_ = "I have 2 numbers: 53147";    @pats = qw{ (.*)(\d*) (.*)(\d+) (.*?)(\d*) (.*?)(\d+) (.*)(\d+)$ (.*?)(\d+)$ (.*)\b(\d+)$ (.*\D)(\d+)$    };

    for $pat (@pats) { printf "%-12s ", $pat; if ( /$pat/ ) {     print "menorque$1maiorque menorque$2maiorque\n"; } else {     print "FAIL\n"; }    }  

That will print out:

    (.*)(\d*)    menorqueI have 2 numbers: 53147maiorque menorquemaiorque    (.*)(\d+)    menorqueI have 2 numbers: 5314maiorque menorque7maiorque    (.*?)(\d*)   menorquemaiorque menorquemaiorque    (.*?)(\d+)   menorqueI have maiorque menorque2maiorque    (.*)(\d+)$   menorqueI have 2 numbers: 5314maiorque menorque7maiorque    (.*?)(\d+)$  menorqueI have 2 numbers: maiorque menorque53147maiorque    (.*)\b(\d+)$ menorqueI have 2 numbers: maiorque menorque53147maiorque    (.*\D)(\d+)$ menorqueI have 2 numbers: maiorque menorque53147maiorque  

As you see, this can be a bit tricky. It’s important to realize that a regular expression is merely a set of assertions that gives a definition of success. There may be 0, 1, or several different ways that the definition might succeed against a particular string. And if there are multiple ways it might succeed, you need to understand backtracking to know which variety of success you will achieve. When using look-ahead assertions and negations, this can all get even tricker. Imagine you’d like to find a sequence of non-digits not followed by “123″. You might try to write that as

    $_ = "ABC123";    if ( /^\D*(?!123)/ ) {  # Wrong! print "Yup, no 123 in $_\n";    }  

But that isn’t going to match; at least, not the way you’re hoping. It claims that there is no 123 in the string. Here’s a clearer picture of why it that pattern matches, contrary to popular expectations:

    $x = 'ABC123' ;    $y = 'ABC445' ;

    print "1: got $1\n" if $x =~ /^(ABC)(?!123)/ ;    print "2: got $1\n" if $y =~ /^(ABC)(?!123)/ ;

    print "3: got $1\n" if $x =~ /^(\D*)(?!123)/ ;    print "4: got $1\n" if $y =~ /^(\D*)(?!123)/ ;  

This prints

    2: got ABC    3: got AB    4: got ABC  

You might have expected test 3 to fail because it seems to a more general purpose version of test 1. The important difference between them is that test 3 contains a quantifier (\D*) and so can use backtracking, whereas test 1 will not. What’s happening is that you’ve asked “Is it true that at the start of $x, following 0 or more non-digits, you have something that’s not 123?” If the pattern matcher had let \D* expand to “ABC”, this would have caused the whole pattern to fail. The search engine will initially match \D* with “ABC”. Then it will try to match (?!123 with “123″, which fails. But because a quantifier (\D*) has been used in the regular expression, the search engine can backtrack and retry the match differently in the hope of matching the complete regular expression. The pattern really, really wants to succeed, so it uses the standard pattern back-off-and-retry and lets \D* expand to just “AB” this time. Now there’s indeed something following “AB” that is not “123″. It’s “C123″, which suffices. We can deal with this by using both an assertion and a negation. We’ll say that the first part in $1 must be followed both by a digit and by something that’s not “123″. Remember that the look-aheads are zero-width expressions–they only look, but don’t consume any of the string in their match. So rewriting this way produces what you’d expect; that is, case 5 will fail, but case 6 succeeds:

    print "5: got $1\n" if $x =~ /^(\D*)(?=\d)(?!123)/ ;    print "6: got $1\n" if $y =~ /^(\D*)(?=\d)(?!123)/ ;

    6: got ABC  

In other words, the two zero-width assertions next to each other work as though they’re ANDed together, just as you’d use any built-in assertions: /^$/ matches only if you’re at the beginning of the line AND the end of the line simultaneously. The deeper underlying truth is that juxtaposition in regular expressions always means AND, except when you write an explicit OR using the vertical bar. /ab/ means match “a” AND (then) match “b”, although the attempted matches are made at different positions because “a” is not a zero-width assertion, but a one-width assertion. WARNING: particularly complicated regular expressions can take exponential time to solve because of the immense number of possible ways they can use backtracking to try match. For example, without internal optimizations done by the regular expression engine, this will take a painfully long time to run:

    'aaaaaaaaaaaa' =~ /((a{0,5}){0,5}){0,5}[c]/  

And if you used *’s instead of limiting it to 0 through 5 matches, then it would take forever–or until you ran out of stack space. A powerful tool for optimizing such beasts is what is known as an “independent group”, which does not backtrack (see (?maiorquepattern)). Note also that zero-length look-ahead/look-behind assertions will not backtrack to make the tail match, since they are in “logical” context: only whether they match is considered relevant. For an example where side-effects of look-ahead might have influenced the following match, see (?maiorquepattern).

Version 8 Regular Expressions

In case you’re not familiar with the “regular” Version 8 regex routines, here are the pattern-matching rules not described above. Any single character matches itself, unless it is a metacharacter with a special meaning described here or above. You can cause characters that normally function as metacharacters to be interpreted literally by prefixing them with a “\” (e.g., “\.” matches a “.”, not any character; “\\” matches a “\”). A series of characters matches that series of characters in the target string, so the pattern blurfl would match “blurfl” in the target string. You can specify a character class, by enclosing a list of characters in [], which will match any one character from the list. If the first character after the “[" is "^", the class matches any character not in the list. Within a list, the "-" character specifies a range, so that a-z represents all characters between "a" and "z", inclusive. If you want either "-" or "]” itself to be a member of a class, put it at the start of the list (possibly after a “^”), or escape it with a backslash. “-” is also taken literally when it is at the end of the list, just before the closing “]”. (The following all specify the same class of three characters: [-az], [az-], and [a\-z]. All are different from [a-z], which specifies a class containing twenty-six characters.) Also, if you try to use the character classes \w, \W, \s, \S, \d, or \D as endpoints of a range, that’s not a range, the “-” is understood literally. Note also that the whole range idea is rather unportable between character sets–and even within character sets they may cause results you probably didn’t expect. A sound principle is to use only ranges that begin from and end at either alphabets of equal case ([a-e], [A-E]), or digits ([0-9]). Anything else is unsafe. If in doubt, spell out the character sets in full. Characters may be specified using a metacharacter syntax much like that used in C: “\n” matches a newline, “\t” a tab, “\r” a carriage return, “\f” a form feed, etc. More generally, \nnn, where nnn is a string of octal digits, matches the character whose ASCII value is nnn. Similarly, \xnn, where nn are hexadecimal digits, matches the character whose ASCII value is nn. The expression \cx matches the ASCII character control-x. Finally, the “.” metacharacter matches any character except “\n” (unless you use /s). You can specify a series of alternatives for a pattern using “” to separate them, so that feefiefoe will match any of “fee”, “fie”, or “foe” in the target string (as would f(eio)e). The first alternative includes everything from the last pattern delimiter (“(“, “[", or the beginning of the pattern) up to the first "", and the last alternative contains everything from the last "" to the next pattern delimiter. That's why it's common practice to include alternatives in parentheses: to minimize confusion about where they start and end. Alternatives are tried from left to right, so the first alternative found for which the entire expression matches, is the one that is chosen. This means that alternatives are not necessarily greedy. For example: when matching foofoot against "barefoot", only the "foo" part will match, as that is the first alternative tried, and it successfully matches the target string. (This might not seem important, but it is important when you are capturing matched text using parentheses.) Also remember that "" is interpreted as a literal within square brackets, so if you write [feefiefoe] you’re really only matching [feio]. Within a pattern, you may designate subpatterns for later reference by enclosing them in parentheses, and you may refer back to the nth subpattern later in the pattern using the metacharacter \n. Subpatterns are numbered based on the left to right order of their opening parenthesis. A backreference matches whatever actually matched the subpattern in the string being examined, not the rules for that subpattern. Therefore, (00x)\d*\s\1\d* will match “0×1234 0×4321″, but not “0×1234 01234″, because subpattern 1 matched “0x”, even though the rule 00x could potentially match the leading 0 in the second number.

Warning on \1 vs $1

Some people get too used to writing things like:

    $pattern =~ s/(\W)/\\\1/g;  

This is grandfathered for the RHS of a substitute to avoid shocking the sed addicts, but it’s a dirty habit to get into. That’s because in PerlThink, the righthand side of a s/// is a double-quoted string. \1 in the usual double-quoted string means a control-A. The customary Unix meaning of \1 is kludged in for s///. However, if you get into the habit of doing that, you get yourself into trouble if you then add an /e modifier.

    s/(\d+)/ \1 + 1 /eg;     # causes warning under -w  

Or if you try to do

    s/(\d+)/\1000/;  

You can’t disambiguate that by saying \{1}000, whereas you can fix it with ${1}000. The operation of interpolation should not be confused with the operation of matching a backreference. Certainly they mean two different things on the left side of the s///.

Repeated patterns matching zero-length substring

WARNING: Difficult material (and prose) ahead. This section needs a rewrite. Regular expressions provide a terse and powerful programming language. As with most other power tools, power comes together with the ability to wreak havoc. A common abuse of this power stems from the ability to make infinite loops using regular expressions, with something as innocuous as:

    'foo' =~ m{ ( o? )* }x;  

The o? can match at the beginning of ‘foo’, and since the position in the string is not moved by the match, o? would match again and again because of the * modifier. Another common way to create a similar cycle is with the looping modifier //g:

    @matches = ( 'foo' =~ m{ o? }xg ,1,5,UNIX_TIMESTAMP());  

or

    print "match: menorque$&maiorque\n" while 'foo' =~ m{ o? }xg;  

or the loop implied by split(). However, long experience has shown that many programming tasks may be significantly simplified by using repeated subexpressions that may match zero-length substrings. Here’s a simple example being:

    @chars = split //, $string;    # // is not magic in split    ($whitewashed = $string) =~ s/()/ /g; # parens avoid magic s// /  

Thus Perl allows such constructs, by forcefully breaking the infinite loop. The rules for this are different for lower-level loops given by the greedy modifiers *+{}, and for higher-level ones like the /g modifier or split() operator. The lower-level loops are interrupted (that is, the loop is broken) when Perl detects that a repeated expression matched a zero-length substring. Thus

   m{ (?: NON_ZERO_LENGTH  ZERO_LENGTH )* }x;  

is made equivalent to

   m{   (?: NON_ZERO_LENGTH )*

        (?: ZERO_LENGTH )?    }x;  

The higher level-loops preserve an additional state between iterations: whether the last match was zero-length. To break the loop, the following match after a zero-length match is prohibited to have a length of zero. This prohibition interacts with backtracking (see “Backtracking”), and so the second best match is chosen if the best match is of zero length.

For example:

    $_ = 'bar';    s/\w??/menorque$&maiorque/g;  

results in "menorquemenorquebmaiorquemenorquemaiorquemenorqueamaiorquemenorquemaiorquemenorquermaiorquemenorquemaiorque”maiorque. At each position of the string the best match given by non-greedy ?? is the zero-length match, and the second best match is what is matched by \w. Thus zero-length matches alternate with one-character-long matches.

Similarly, for repeated m/()/g the second-best match is the match at the position one notch further in the string.

The additional state of being matched with zero-length is associated with the matched string, and is reset by each assignment to pos(). Zero-length matches at the end of the previous match are ignored during split.

Combining pieces together

Each of the elementary pieces of regular expressions which were described before (such as ab or \Z) could match at most one substring at the given position of the input string. However, in a typical regular expression these elementary pieces are combined into more complicated patterns using combining operators ST, ST, S* etc (in these examples S and T are regular subexpressions).

Such combinations can include alternatives, leading to a problem of choice: if we match a regular expression aab against "abc", will it match substring "a" or "ab"? One way to describe which substring is actually matched is the concept of backtracking (see “Backtracking”). However, this description is too low-level and makes you think in terms of a particular implementation.

Another description starts with notions of “better”/”worse”. All the substrings which may be matched by the given regular expression can be sorted from the “best” match to the “worst” match, and it is the “best” match which is chosen. This substitutes the question of “what is chosen?” by the question of “which matches are better, and which are worse?”.

Again, for elementary pieces there is no such question, since at most one match at a given position is possible. This section describes the notion of better/worse for combining operators. In the description below S and T are regular subexpressions.

ST

Consider two possible matches, AB and A'B', A and A' are substrings which can be matched by S, B and B' are substrings which can be matched by T.

If A is better match for S than A', AB is a better match than A'B'.

If A and A' coincide: AB is a better match than AB' if B is better match for T than B'.

ST

When S can match, it is a better match than when only T can match.

Ordering of two matches for S is the same as for S. Similar for two matches for T.

S{REPEAT_COUNT}
Matches as SSS...S (repeated as many times as necessary).
S{min,max}
Matches as S{max}S{max-1}...S{min+1}S{min}.
S{min,max}?
Matches as S{min}S{min+1}...S{max-1}S{max}.
S?, S*, S+
Same as S{0,1}, S{0,BIG_NUMBER}, S{1,BIG_NUMBER} respectively.
S??, S*?, S+?
Same as S{0,1}?, S{0,BIG_NUMBER}?, S{1,BIG_NUMBER}? respectively.
(?maiorqueS)
Matches the best match for S and only that.
(?=S), (?menorque=S)
Only the best match for S is considered. (This is important only if S has capturing parentheses, and backreferences are used somewhere else in the whole regular expression.)
(?!S), (?menorque!S)
For this grouping operator there is no need to describe the ordering, since only whether or not S can match is important.
(??{ EXPR })
The ordering is the same as for the regular expression which is the result of EXPR.
(?(condition)yes-patternno-pattern)
Recall that which of yes-pattern or no-pattern actually matches is already determined. The ordering of the matches is the same as for the chosen subexpression.

The above recipes describe the ordering of matches at a given position. One more rule is needed to understand how a match is determined for the whole regular expression: a match at an earlier position is always better than a match at a later position.

Creating custom RE engines

Overloaded constants (see overload) provide a simple way to extend the functionality of the RE engine.

Suppose that we want to enable a new RE escape-sequence \Y which matches at boundary between white-space characters and non-whitespace characters. Note that (?=\S)(?menorque!\S)(?!\S)(?menorque=\S) matches exactly at these positions, so we want to have each \Y in the place of the more complicated version. We can create a module customre to do this:

    package customre;    use overload;

    sub import {      shift;      die "No argument to customre::import allowed" if @_;      overload::constant 'qr' =maiorque \&convert;    }

    sub invalid { die "/$_[0]/: invalid escape '\\$_[1]'"}

    my %rules = ( '\\' =maiorque '\\',    'Y' =maiorque qr/(?=\S)(?menorque!\S)(?!\S)(?menorque=\S)/ );    sub convert {      my $re = shift;      $re =~ s{                \\ ( \\  Y . )              }              { $rules{$1} or invalid($re,$1) }sgex;      return $re;    }  

Now use customre enables the new escape in constant regular expressions, i.e., those without any runtime variable interpolations. As documented in overload, this conversion will work only over literal parts of regular expressions. For \Y$re\Y the variable part of this regular expression needs to be converted explicitly (but only if the special meaning of \Y should be enabled inside $re):

    use customre;    $re = menorquemaiorque;    chomp $re;    $re = customre::convert $re;    /\Y$re\Y/;  

BUGS

This document varies from difficult to understand to completely and utterly opaque. The wandering prose riddled with jargon is hard to fathom in several places.

This document needs a rewrite that separates the tutorial content from the reference content.

SEE ALSO

perlop/”Regexp Quote-Like Operators”.

perlop/”Gory details of parsing quoted constructs”.

perlfaq6.

perlfunc/pos.

perllocale.

Mastering Regular Expressions by Jeffrey Friedl, published by O’Reilly and Associates.

Enviado em Referencia | Deixar um comentário »

Tipos de dados do banco MS Access

Publicado por agostinhojr em 21 Março, 2007

Propriedade Type

Define ou retorna um valor que indica o tipo operacional ou o tipo de dados de um objeto. Configurações e valores de retorno A configuração ou valor de retorno é uma constante que indica um tipo operacional ou de dados. Para um objeto Field, Parameter ou Property, as possíveis configurações e valores de retorno são os seguintes:

Constante Descrição Observação
dbBigInt Inteiro grande tipo de dados Big Integer – Um tipo de dados que armazena um valor numérico exato e com sinal, com precisão 19 (com sinal) ou 20 (sem sinal), escala 0 (com sinal: -263 ≤ n ≤ 263-1; sem sinal: 0 ≤ n ≤ 264-1).
dbBigInt Inteiro grande tipo de dados Big Integer – Um tipo de dados que armazena um valor numérico exato e com sinal, com precisão 19 (com sinal) ou 20 (sem sinal), escala 0 (com sinal: -263 ≤ n ≤ 263-1; sem sinal: 0 ≤ n ≤ 264-1).
dbBinary Binário tipo de dados Binary – Um tipo de dados que armazena dados binários de comprimento fixo. O comprimento máximo é de 255 bytes
dbBoolean Booleano tipo de dados Boolean – Um valor True/False ou sim/não. Os valores Boolean normalmente são armazenados em campos de bits em um banco de dados Microsoft Jet; entretanto, alguns bancos de dados não dão suporte direto a este tipo de dados.”
dbByte Byte Tipo de dados Byte – Um tipo de dados fundamental usado para manter os números inteiros positivos menores em um intervalo de 0 a 255.
dbChar Caracter tipo de dados Char – Um tipo de dados que armazena uma seqüência de caracteres de comprimento fixo. O comprimento é definido pela propriedade Size.
dbCurrency Unidade monetária Tipo de dados Currency Um tipo de dados útil para cálculos envolvendo dinheiro ou para cálculos de ponto fixo em que a precisão é extremamente importante. Este tipo de dados é usado para armazenar números com até 15 dígitos à esquerda do ponto decimal e 4 dígitos à direita. Como o tipo de dados Currency usa valores distintos em todas as quantidades, o arredondamento binário não é um fator no cálculo de totais.
dbDate Data/hora datas e horas As datas e horas são armazenadas internamente como partes diferentes de um número real. O valor à esquerda do decimal representa uma data entre 30 de dezembro de 1899 e 30 de dezembro de 9999, inclusive. Os valores negativos representam as datas anteriores a 30 de dezembro de 1899. O valor à direita do decimal representa uma hora entre 0:00:00 e 23:59:59, inclusive. O meio-dia é representado por 5.
dbDecimal Decimal tipo de dados Decimal Um tipo de dados que armazena um valor numérico exato e com sinal, com precisão p e escala s (1 ≤ p ≤15; 0 ≤ s ≤ p).
dbDouble Duplo tipo de dados Double Um tipo de dados fundamental que dá suporte aos números de ponto flutuante de dupla precisão no formato IEEE. Uma variável Double é armazenada como um número de 64 bits (8 bytes) no intervalo de -1,79769313486231E308 a -4,94065645841247E-324 para valores negativos, de 4,94065645841247E-324 a 1,79769313486231E308 para valores positivos e 0.
dbFloat Flutuante tipo de dados Float Um tipo de dados que armazena um valor numérico aproximado e com sinal, com precisão da mantissa de 15 (zero ou valor absoluto de 10-308 a 10.308).
dbGUID GUID tipo de dados GUID Globally Unique Identifier/Universally Unique Identifier (GUID, identificador exclusivo global/identificador exclusivo universal). Uma seqüência de caracteres de identificação exclusiva usada com chamadas remotas de procedimento. Todas as interfaces e classes de objetos usam um GUID para identificação. Os GUIDs no cliente e no servidor devem coincidir para que o cliente e o servidor se vinculem. Os fabricantes de objetos podem solicitar que a Microsoft aloque um ou mais conjuntos de 256 GUIDs para seu uso exclusivo. Por outro lado, se você tiver uma placa de rede, poderá executar uma ferramenta chamada Uuidgen.exe, que fornece um conjunto de 256 GUIDs baseado na hora do dia, data e um número exclusivo contido na sua placa de rede.
dbInteger Inteiro tipo de dados Integer Um tipo de dados fundamental que contém números inteiros. Uma variável Integer é armazenada como um número de 16 bits (2 bytes) no intervalo de -32.768 a 32.767.
dbLong Longo tipo de dados Long Um tipo de dados fundamental que mantém números inteiros extensos. A variável Long é armazenada como um número de 32 bits (4 bytes) com valor no intervalo de -2.147.483.648 a 2.147.483.647.
dbLongBinary Binário longo (objeto OLE) tipo de dados OLE Object Um tipo de dados de campos que você usa em objetos criados em outros aplicativos que podem ser vinculados ou incorporados em um banco de dados Microsoft Jet. Por exemplo, você poderia usar um campo Objeto OLE para armazenar uma coleção de figuras.
dbMemo Memorando tipo de dados Memo Um tipo de dados de campo, como por exemplo, os campos que podem conter até 1,2 GB de dados de texto.
dbNumeric Numérico tipo de dados Numeric Um tipo de dados que armazena um valor numérico exato e com sinal, com precisão p e escala s (1 ≤ p ≤15; 0 ≤ s ≤ p).
dbSingle Único tipo de dados Single Um tipo de dados fundamental que mantém números de ponto flutuante de precisão simples no formato IEEE. Uma variável Single é armazenada como um número de 32 bits (4 bytes) com um valor no intervalo de -3,402823E38 a -1,401298E-45 para valores negativos, de 1,401298E-45 a 3,402823E38 para valores positivos e 0.
dbText Texto Tipo de dados Text Um tipo de dados de campo. Os campos de texto podem conter até 255 caracteres ou o número de caracteres especificado pela propriedade Size do objeto Field, aquele que for menor. Se a propriedade Size do campo de texto for definida como 0, o campo de texto poderá conter até 255 caracteres de dados.
dbTime Hora tipo de dados Time Um tipo de dados que armazena um valor de tempo. O valor depende da configuração do relógio da fonte de dados.
dbTimeStamp Carimbo de hora tipo de dados TimeStamp Um tipo de dados que armazena um TimeStamp. O valor depende da configuração do relógio da fonte de dados.

Propriedade Tipo (MDB)

No Microsoft Access, você pode definir o tipo de dados de um campo no modo estrutura da tabela, além de poder definir o tipo de dados de um parâmetro na caixa de diálogo Parâmetros da consulta. Essas ações equivalem a definir a propriedade Tipo DAO para um objeto Field ou um objeto Parameter utilizando o Visual Basic. A tabela a seguir lista as constantes da propriedade Tipo DAO e as configurações correspondentes do Microsoft Access para os tipos de dados de parâmetro e de campo se você os estiver definindo a partir de tabela modo estrutura ou da caixa de diálogo Parâmetros da consulta. Ao criar um campo de tabela com o tipo de dados Número, defina a propriedade FieldSize para especificar qual dos seis tipos de dados numéricos será o campo. Por padrão, essa propriedade é definida como Inteiro longo. As outras configurações são Byte, Inteiro, Simples, Duplo e CódigoDeReplicação.

Constante Configuração do campo de tabela Configuração do parâmetro de consulta
dbBoolean Sim/Não Sim/Não
dbByte Número(FieldSize = Byte) Byte
dbCurrency Moeda Moeda
dbDate Data/Hora Data/Hora
dbDouble Número(FieldSize = Duplo) Duplo
dbGUID Número ou AutoNumeração(FieldSize = CódigoDeReplicação) Sem suporte
dbInteger Número(FieldSize = Inteiro) Inteiro
dbLong Número(FieldSize = Inteiro Longo) Inteiro longo
AutoNumeração(FieldSize = Inteiro longo) Sem suporte
dbLongBinary Objeto OLE Objeto OLE
Sem suporte Binário
dbMemo Memorando Memorando
dbSingle Número(FieldSize = Simples) Simples
dbText Texto Texto
Sem suporte Sem suporte Valor

Observação: O tipo de dados de parâmetro Valor não corresponde a um tipo de dados definido pelo mecanismo de banco de dados Microsoft Jet. Ele corresponde à palavra reservada SQL VALUE, que pode ser utilizada para criar uma consulta parâmetro. Em consultas SQL ou do Microsoft Access, VALUE pode ser considerado um sinônimo válido para o tipo de dados Variante do Visual Basic.

Enviado em Referencia | Deixar um comentário »

Acrônimos

Publicado por agostinhojr em 21 Março, 2007

Internet abbreviations

A| B| C| D|E| F| G| H| I | J| K| L|M| N| O|P| Q| R| S| T| U| V| W| X| Y| Z


A

10Q         - Thank You1FTR        - One For The Road24/7        - 24 hours a day, 7 days a weekAAMOF       - As A Matter Of FactACK         - AcknowledgementACRONYM     - Abbreviated Coded Rendition Of Name Yielding MeaningADN         - Any Day NowAFAIAC      - As Far As I Am ConcernedAFAICT      - As Far As I Can TellAFAIK       - As Far As I KnowAFAIUI      - As Far As I Understand ItAFK         - Away From The KeyboardAISB        - As I Said BeforeAISE        - As I Said EarlierAISI        - As I See ItAIW         - As It Were/WasAKA         - Also Known AsAMAP        - As Much/Many As PossibleAMF         - Adios My Friend; Adios Mother F*ckerANFAWFOS    - And Now For A Word From Our SponsorANSI        - American National Standards InstituteAOB         - Any Other BusinessAPAC        - All Praise And CreditAPI         - Application Program InterfaceARPA        - Advanced Research Projects AgencyASAFP       - As Soon As F*cking PossibleASAP        - As Soon As PossibleASCII       - American Standard Code for Information InterchangeATB         - All The BestATK         - At The KeyboardATLA        - Another Three Letter AcronymATTN        - AttentionATTYOB      - Anything That Turns You On BabyAWCIGO      - And Where Can I Get OneAWGTHTGTATA - Are We Going To Have To Go Through All This/That AgainAWGTHTGTTA  - Are We Going To Have To Go Through This/That AgainAWHFY       - Are We Having Fun YetAYT         - Are You There


B

B/C         - BecauseB4          - BeforeB4N         - Bye For NowBAC         - By Any ChanceBAD         - Broken As DesignedBAK         - Back At KeyboardBAMF        - Bad Assed Mother F*ckerBBB         - Busy Beyond BeliefBBFN        - Bye Bye For NowBBIAB       - Be Back In A BitBBIAS       - Be Back In A SecBBL         - Be Back LaterBBR         - Burnt Beyond RepairBBS         - Bulletin Board SystemBC          - Basket CaseBCC         - Blind Carbon CopyBCNU        - Be Seein' You<BEG>       - Big Evil GrinBF          - Boy FriendBFD         - Big F*cking DealBFG         - Big Friendly Giant; Big F*cking GunBFH         - Bastard From HellBFI         - Brute Force and Ignorance; Bunch of F*cking IdiotsBFMI        - Brute Force and Massive IgnoranceBFN         - Bye For Now<BG>        - Big GrinBIL         - Brother In LawBION        - Believe It Or NotBIOYA       - Blow It Out Your A*seBITD        - Beaten It To DeathBK          - BecauseBMF         - Bad Mother F*ckerBMHATK      - Banging My Head Against The KeyboardBMHATW      - Banging My Head Against The WallBMOC        - Big Man On CampusBMTA        - Brilliant Minds Think AlikeBMTIPG      - Brilliant Minds Think In Parallel GuttersBNF         - Big Name FanBOC         - But Of CourseBOF         - Birds Of a FeatherBOFH        - Bastard Operator From HellBOHOF       - Back Of Hand On ForeheadBOHICA      - Bend Over Here It Comes AgainBOS         - Big Orange SwitchBOT         - Back On TopicBOTEC       - Back Of The Envelope CalculationBRB         - Be Right BackBRS         - Big Red SwitchBRT         - Be Right ThereBS          - Bullsh*tBSEG        - Big Sh*t Eating GrinBSG         - Big Smiling Grin; Broad Sweeping GeneralisationBTA         - But Then AgainBTAICBW     - But Then Again I Could Be WrongBTAIM       - Be That As It MayBTDT        - Been There Done ThatBTDTGTTS    - Been There Done That Got The T-ShirtBTOBD       - Be There Or Be DeadBTOBS       - Be There Or Be SquareBTSOOM      - Beats The Sh*t Out Of MeBTTP        - Back To The PointBTW         - By The WayBWQ         - Buzz Word QuotientBY          - BusYBYKT        - But You Know/Knew ThatBYKTA       - But You Know/Knew That AlreadyBYOB        - Bring Your Own Bottle/Booze


C

C/O         - Care OfC&P         - Copy & PasteCADET       - Can't Add Doesn't Even TryCB          - Call BackCC          - Carbon CopyCCWC        - Can't Cook Won't CookCE          - Creative EditingCERT        - Computer Emergency Response TeamCFD         - Call For DiscussionCFV         - Call For Votes<CG>        - Cute GrinCGI         - Common Gateway InterfaceCHOWUR      - See HOW yoU aReCHUR        - See How yoU aReCIAC        - Computer Incident Advisory CapabilityCIAO        - goodbye [pronounced Chow]CIC         - Christ I'm ConfusedCIO         - Cut It OutCLAB        - Crying Like A BabyCLM         - Career Limiting MoveCMIIW       - Correct Me If I'm WrongCO          - COnferenceCOD         - Cash On DeliveryCPF         - Can Pigs FlyCRAFT       - Can't Remember A F*cking ThingCRC         - Cyclic Redundancy CheckCRS         - Can't Remember Sh*tCS          - Cop ShopCTTD        - Cute Things They DoCTTS        - Cute Things They SayCU          - See yoUCUL         - See yoU LaterCUL8R       - See yoU LateRCWYL        - Chat With You LaterCYA         - See Ya; Cover Your A*seCYL         - See You Later


D

D/L         - DownloadD&W         - Ducking And WeavingDAP         - Parents Against Dyslexia [chuckle]DARFC       - Ducking And Running For CoverDBA         - Doing Business AsDBN         - Doing Business - NotDFM         - Don't Flame MeDFU         - Don't Forget UnitsDIIK        - Damned If I KnowDIIN        - Damned If I kNowDILLIGAF    - Does It Look Like I Give A F*ckDILLIGAFF   - Does It Look Like I Give A Flying F*ckDIM         - Do It MyselfDIY         - Do It YourselfDK          - Don't KnowDL          - DownLoadDLG         - Devilish Little GrinDNA         - Did Not AnswerDNPM        - Darn Near P*ssed MyselfDNS         - Domain Name SystemDOA         - Dead On ArrivalDOB         - Date Of BirthDOLT        - Division of Overseas Lemming Technicians             (only seen in private newsgroups - aol.newsgroups.*)DOM         - Dirty Old ManDOS         - Disk Operating System [the original computer operating              system developed by Microsoft, and how they made their             name <g>]DTP         - DeskTop PublishingDTRT        - Do The Right ThingDTTAH       - Don't Try This At HomeDUCWIC      - Do YoU See What I SeeDUK         - Dead Upon KeyboardDWIM        - Do What I MeanDWIMC       - Do What I Mean CorrectlyDWIMNWIS    - Do What I Mean Not What I SayDWISNWID    - Do What I Say Not What I DoDYE         - Damn Your EyesDYHWIH      - Do You Hear What I HearDYSWIS      - Do You See What I See


E

E2EG       - Ear to Ear GrinE&OE       - Errors And Omissions ExceptedED         - Emotionally DisturbedEDP        - Emotionally Disturbed Person<EG>       - Evil GrinEIF        - Exercise In FutilityEOB        - End Of BusinessEOD        - End Of DiscussionEOF        - End Of FileEOL        - End Of Lectureeom        - End Of Message (nearly always seen in lower case)EOT        - End Of ThreadES&D       - Eat Sh*t And DieESAD       - Eat Sh*t And DieESAL       - Eat Sh*t And LiveESP        - ESPeciallyESOSL      - Endless Snorts Of Stupid LaughterETA        - Estimated Time Of ArrivalETLA       - Extended Three Letter Acronym


F

F2F        - Face To FaceFAQ        - Frequently Asked Question(s)FCFS       - First Come First ServedFCOL       - For Crying Out LoudFDROTFL    - Falling Down Rolling On The Floor LaughingFFRD       - Flying F*ck in a Rolling DoughnutFFS        - For F*ck's SakeFIGJAM     - F*ck I'm Good Just Ask MeFIGMO      - F*ck It Got My OrdersFIIK       - F*cked If I KnowFIIN       - F*cked If I kNowFIL        - Father In LawFIRST      - Forum of Incident Response and Security TeamsFISH       - First In Still HereFITB       - Fill In The BlankFLEA       - Four Letter Extended AcronymFMH        - F*ck Me HarderFOAD       - F*ck Off And DieFOAF       - Friend Of A FriendFOAFOAG    - Father Of A Friend Of A GirlfriendFOAG       - Father Of A GirlfriendFOD        - Finger Of DeathFOS        - Freedom Of Speech; Full Of Sh*tFOT        - Full Of TripeFOTCL      - Falling Off The Chair LaughingFRED       - F*cking Ridiculous Electronic DeviceFRO        - F*ck Right OffFROB       - F*ck Right Off BabyFSD        - Fools Seldom DifferFTASB      - Faster Than A Speeding BulletFTF        - Face To FaceFTL        - Faster Than LightFTP        - File Transfer ProtocolFTS        - Fixin' To StartFUBAB      - F*cked Up Beyond All BelieveFUBAR      - F*cked Up Beyond All Repair/RecognitionFUD        - Fear Uncertainty And DoubtFUMTU      - F*cked Up More Than UsualFURTB      - Full Up Ready To BurstFWIW       - For What It's WorthFYA        - For Your AmusementFYI        - For Your Information


G

G          - Grin <g>GA         - Go AheadGAC        - Get A ClueGAFIA      - Get Away From It AllGAL        - Get A LifeGD&R       - Grinning Ducking And RunningGD&RF      - Grinning Ducking And Running FastGD&RVVF    - Grinning Ducking And Running Very Very FastGD&W       - Grinning Ducking And WeavingGF         - GirlFriendGFU        - General F*ck UpGFY        - Go F*ck YourselfGFYS       - Go F*ck Your SelfGGN        - Gotta Go NowGGP        - Gotta Go PeeGIF        - Graphical Interchange FormatGIGO       - Garbage In Garbage Out; Garbage In Gospel OutGIWIST     - Gee I Wish I'd Said ThatGLG        - Goofy Little GrinGLGH       - Good Luck and Good HuntingGMTA       - Great Minds Think AlikeGOK        - God Only KnowsGOOML      - Get Out Of My LifeGOTFIA     - Groaning On The Floor In AgonyGOWI       - Get On With ItGPF        - General Protection Fault; Go Puke FastGRQ        - Get Rich Quick - a type of spam (MMF)GRUIT      - Get Real yoU Impudent ThingGTBOS      - Glad To Be Of ServiceGTFOOMF    - Get The F*ck Out Of My FaceGTFOH      - Get The F*ck Outta HereGTG        - Got To GoGTGN       - Got To Go NowGTP        - Got To PeeGYFFR      - Get Your F*cking Facts Right


H

H2         - How ToHAND       - Have A Nice DayHCB        - Holy Cow BatmanHHGTTG     - Hitch Hiker's Guide To The GalaxyHHO½K      - Ha Ha Only Half KiddingHHOJ       - Ha Ha Only JokingHHOK       - Ha Ha Only KiddingHHOS       - Ha Ha Only SeriousHIB__      - Have I Been ___________HICA       - Here It Comes AgainHNG        - Horny Net GeekHOMPR      - Hang On Mobile Phone's RingingHOPR       - Hang On Phone's RingingHOS        - Husband Over ShoulderHOUER      - Hanging On yoUr Every WordHOYER      - Hanging On Your Every WordHSIK       - How Should I KnowHSP        - Highly Sensitive PersonHTFSIK     - How The F*ck Should I KnowHTH        - Hope This HelpsHTML       - HyperText Markup LanguageHTTP       - HyperText Transfer ProtocolHUA        - Head Up A*seHW         - HardWareHWUA       - Head Way Up A*se


I

IAAA       - I Am An AccountantIAAD       - I Am A DoctorIAAL       - I Am A LawyerIAC        - In Any CaseIAE        - In Any EventIAGFII     - It's All Good Fun Isn't ItIANA       - Internet Assigned Numbers AuthorityIANAA      - I Am Not An AccountantIANAC      - I Am Not A CrookIANAD      - I Am Not A DoctorIANAL      - I Am Not A LawyerIAP        - Internet Access ProviderIARTPFWTSIOWIM          - I Am Repeating This Parrot Fashion Without The Slightest            Idea Of What It MeansIAWC       - In A While Crocodile [usually used to reply to SYLA(cf)]IBC        - Inadequate But CuteIBM        - Inadequate But MarketableIBTD       - I Beg To DifferIC         - I SeeICB        - I Care BecauseICBW       - I Could Be WrongICCL       - I Couldn't Care LessICGAFF     - I Couldn't Give A Flying F*ckICP        - Internet Content ProviderICTYBTIHTKY- I Could Tell You But Then I'd Have To Kill YouICUR       - I See yoU aReIDGAD      - I Don't Give A DamnIDGAF      - I Don't Give A F*ck (also seen as I Do Give A F*ck)IDGAFF     - I Don't Give A Flying F*ckIDGAS      - I Don't Give A Sh*tIDGI       - I Don't Get ItIDK        - I Don't KnowiDOT       - Internet Development Outreach and TechnologyIDTS       - I Don't Think SoIDTT       - I'll Drink To ThatIETF       - Internet Engineering Task ForceIHABICNRWTSF - I Hate Abbreviations Because I Can Never Remember What              They Stand For [pronounced Eye habbik nerwit siff<g>]IHTFP      - I Hate This F*cking Place; I Have Truly Found ParadiseIIABDFI    - If It Ain't Broke Don't Fix ItIIRC       - If I Recall/Remember CorrectlyIITYWITIWHTKY - If I Tell You What It Means I Will Have To Kill YouIITYWIMWYBMAD - If I Tell You What It Means Will You Buy Me A DrinkIITYWIMWYKM   - If I Tell You What It Means Will You Kiss MeIJLS       - I Just Like SayingIK         - I KnowIKWUM      - I Know What yoU MeanIKWYM      - I Know What You MeanILI        - I Like IkeILIWAPCT   - I Love It When A Plan Comes TogetherILU        - I Love yoUILY        - I Love YouIMAO       - In My Arrogant OpinionIMBO       - In My Biased OpinionIMCDO      - In My Conceited Dogmatic OpinionIMCO       - In My Considered OpinionIME        - In My ExperienceIMHO       - In My Humble OpinionIMMOR      - I Make My Own RulesIMNSHO     - In My Not So Humble OpinionIMO        - In My OpinionIMOBO      - In My Own Biased OpinionIMPE       - In My Personal/Previous ExperienceIMPOV      - In My Point Of ViewIMVHO      - In My Very Humble OpinionINGSI      - I'm Not Going To Say ItINPO       - In No Particular OrderINT        - I'll Never TellIOU        - I Owe YouIOW        - In Other WordsIP         - Internet ProtocolIR         - Inter RacialIRC        - Internet Relay ChatIRL        - In Real LifeIROOC      - I've Run Out Of CigarettesISC        - I Stand CorrectedISDN       - Integrated Services Digital NetworkISP        - Internet Service ProviderISTM       - It Seems To MeISTR       - I Seem To RememberITFA       - In The Final AnalysisITMA       - Its That Man AgainIUTHALORFH - I Used To Have A Lot Of Respect For Him/HerIT         - Information Technology [a global term for all things now to                                     do with computers]ITYM       - I Think You MeanIUTKATS    - I Used To Know All That StuffIWBNI      - It Would Be Nice IfIWIK       - I Wish I KnewIYF        - In Your FaceIYF __     - Insert Your Favourite ________IYFEG      - Insert Your Favourite Ethnic GroupIYSWIM     - If You See What I Mean


J

J/K        - Just KiddingJAFO       - Just Another F*cking ObserverJAFU       - Just Another F*ck UpJAM        - Just A Moment/MinuteJAO        - Just Another ObserverJAS        - Just A SecondJFF        - Just For FunJIC        - Just In CaseJPEG       - Joint Photographic Experts GroupJFTR       - Just For The RecordJTYWTK     - Just Thought You Wanted To Know


K

K          - oKayKIA        - Know It AllKIBO       - Knowledge In Bullsh*t OutKISS       - Keep It Simple StupidKITA       - Kick In The A*seKMA        - Kiss My A*seKMWIH      - Kick Me Where It HurtsKMYF       - Kiss Me You FoolKOS        - Kids Over ShoulderKOTC       - Kiss On The CheekKOTL       - Kiss On The LipsKOTM       - Kook Of The MonthKTCOOTN    - Keep This Crap Out Of This NewsgroupKWIM       - Know What I MeanKYHU       - Keep Your Head UpKYHOOTW    - Keep Your Head Out Of The Water


L

L8R        - LaterLAB&TYD    - Life's A Bitch And Then You DieLAB&TYMO   - Life's A Bitch And Then You Marry OneLAGNAF     - Let's All Get Naked And F*ckLALL       - Live And Let LiveLAN        - Local Area NetworkLART       - Luser Attitude Re-adjustment ToolLJBF       - Let's Just Be FriendsLLTA       - Lots and Lots of Thunderous ApplauseLMA        - Leave Me AloneLMAO       - Laughing My A*se OffLMAOROTF   - Laughing My A*se Off Rolling On The FloorLMC        - Lost My ConnectionLMCOA      - Lost My Connection Once AgainLMFAO      - Laughing My F*cking A*se OffLMK        - Let Me KnowLMTFA      - Leave Me The F*ck AloneLoTR       - Lord of The RingsLOL        - Laughing Out Loud; Little Old Lady;            Lots of Love [minority usage]LSFIAB     - Like Shooting Fish In A BarrelLSHIPMP    - Laughing So Hard I Peed My PantsLSMIF      - Laughing So Much I FartedLSMISMT    - Laughing So Much I Shot My TampaxLSP        - Less Sensitive PersonLTBF       - Learn To Be FunnyLTIP       - Laughing 'Til I PukeLTMSH      - Laughing 'Til My Sides HurtLTNS       - Long Time No SeeLUSER      - Loser USER


M

MAY        - Mad About YouMAYB       - Mad About You BabyMB         - Message BoardMBR        - Master Boot RecordMCIBTY     - My Computer Is Better Than YoursMFG        - More Friendly GarbageMFIC       - Mother F*cker In ChargeMFWIC      - Mother F*cker What's In ChargeMHBFY      - My Heart Bleeds For YouMHDC       - My Hard Drive CrashedMHM        - Members Helping MembersMHOTY      - My Hat's Off To YouMIL        - Mother In LawMIME       - Multi-purpose Internet Mail ExtensionsMIPS       - Meaningless Information Per SecondML         - More LaterMLA        - Multiple Letter AcronymMMF        - Make Money Fast - a type of spam, illegal in most countriesMMIF       - My Mouth Is FullMMX        - Multi-Media eXtensionsMOF        - Matter Of FactMOMN       - Milk Out My NoseMORF       - Male OR FemaleMOS        - Member of the Opposite SexMOTAS      - Member Of The Appropriate SexMOTD       - Message Of The DayMOTOS      - Member Of The Opposite SexMOTSS      - Member Of The Same SexMS         - More Sh*t; More of the SameMSCEA      - My Southern Comfort's Empty AgainMSS        - Member of the Same SexMTFBWY     - May The Force Be With YouMUD        - Multi-User Dungeon/DomainMUNG       - Mash/Mung Until No GoodMYOB       - Mind Your Own Business


N

N/M        - Never MindNAGI       - Not A Good IdeaNANAE      - news.admin.net-abuse.email [Usenet newsgroup]NANAU      - news.admin.net-abuse.usenet [Usenet newsgroup]NAVY       - Never Again Volunteer YourselfNAYY       - Not Affiliated. Yada-Yada. [origin unknown]NB         - Nota Bene [Latin for Note Well, i.e. what follows is             important]NBD        - No Big DealNBL        - Not Bloody LikelyNBTD       - Nothing Better To DoNDM        - No Disrespect MeantNERD       - National Establishment for Real DorksNFG        - No F*cking GoodNFI        - No F*cking IdeaNFW        - No F*cking WayNFY        - No - F*ck YouNHOH       - Never Heard Of Her/HimNICBDAT    - Nothing Is Certain But Death And TaxesNIDWTC     - No I Don't Want To ChatNIH        - Not Invented HereNIMBY      - Not In My Back YardNINO       - Nothing In Nothing OutNIMTO      - Not In My Term Of OfficeNIT        - Not In TherapyNLI        - Not Logged InNM         - No Message [used in the subject title of an email which                         includes only an attachment]NMI        - No Middle InitialNMP        - Not My ProblemNN         - Night NightNNTP       - Network News Transfer ProtocolNoCeM      - No See 'eMNOOTO      - Nothing Out Of The OrdinaryNOYB       - None Of Your BusinessNP         - No ProblemNP         - No Picture [used in the subject title of an email]NPF        - No Problem FoundNPLU       - Not People Like UsNQA        - No Questions AskedNQOS       - Not Quite Our SortNRN        - No Reply NecessaryNSS        - No Sh*t SherlockNTG        - Not Too GoodNTH        - No Therapy HelpfulNTIBOA     - Not That I'm Bitter Or AnythingNTIM       - Not That It MattersNTIMM      - Not That It Matters MuchNTL        - None The Less/Never The LessNUI        - Network User IdentificationNYCTMI     - Now You Come To Mention ItNYP        - Not Your Problem


O

O          - Over [to you]OATUS      - On A Totally Unrelated SubjectOAUS       - On An Unrelated SubjectOB         - OBligatoryOBTW       - Oh By The WayOD         - OverDose; Oh DearOIC        - Oh I SeeOMFG       - Oh My F*cking GodOMG        - Oh My GodONNA       - Oh No Not AgainONNTA      - Oh No Not That/This AgainOO         - Over and OutOOI        - Out Of InterestOOSOOM     - Out Of Sight Out Of MindOOTC       - Obligatory On Topic Comment [indicates that part of a message             that pertains in some way to the Usenet newsgroup that the             message appears in]OSIM       - Oh Sh*t It's MondayOT         - Off TopicOTC        - Over The CounterOTD        - Out The DoorOTF        - On The FloorOTGH       - On The Gripping HandOTL        - Out To LunchOTOH       - On The Other HandOTOOH      - On The Other Other HandOTT        - Over The TopOTTH       - On The Third HandOTTOMH     - Off The Top Of My HeadOTW        - On The WholeOW         - Oh WellOWTTE      - Or Words To That Effect


P

PABG       - Pack A Big GunPBM        - Play By Mail (games)PBNFL      - Possible, But Not F*cking LikelyPCB        - Please Call BackPCMCIA     - People Can't Master Computer Industry AcronymsPD         - Public DomainPDA        - Public Display of AffectionPDN        - Public Data NetworkPDQ        - Pretty Damn QuickPEM        - Privacy Enhanced MailPEST       - Please Excuse Slow TypingPGP        - Pretty Good PrivacyPhD        - Piled Higher and DeeperPIMP       - Pee In My PantsPITA       - Pain In The A*sePKB        - Pot Kettle BlackPLMK       - Please Let Me KnowPLMKO      - Please Let Me Know OkPLOKTA     - Press Lots Of Keys To AbortPMBI       - Pardon My Butting InPMETC      - Pardon Me ETCPMFBI      - Pardon Me For Butting InPMFJI      - Pardon Me For Jumping InPMFJIH     - Pardon Me For Jumping In HerePMJI       - Pardon My Jumping InPO         - Piss OffPOETS (day)- Piss Off Early Tomorrow's SaturdayPOM        - Phase Of the MoonPOP        - Point Of Presence; Post Office ProtocolPOQ        - Piss Off QuicklyPOQADCB    - Piss Off Quickly And Don't Come BackPOS        - Parents Over ShoulderPOTS       - Plain Old Telephone Service/SystemPOV        - Point Of ViewPPL        - PeoPLePPP        - Point-to-Point Protocol; Petty Pet PeevePPPP       - Previous Paragraph was Polemical PositionPTB        - Powers That BePTMM       - Please Tell Me MorePTMY       - Pleased To Meet YouPTMYA      - Pleased To Make Your AcquaintancePTO        - Please Turn OverPW         - Pathetic Wanker; PowWow


Q

QED        - Quod Erat Demonstrandum; Quite Easily DoneQPQ        - Quid Pro Quo


R

RE         - REgardingRFC        - Request For CommentsRFD        - Request For DiscussionRFM        - Reply To Flagged MessageRFN        - Right F*cking NowRFT        - Request For ThinkingRHIP       - Rank Hath Its PrivilegesRL         - Real LifeRLCO       - Real Life COnferenceRNA        - Ring No AnswerROFFNAR    - Rolling On the Floor For No Apparent ReasonROFL       - Rolling On Floor LaughingROFLMAO    - Rolling On Floor Laughing My A*se OffROFLWPIMP  - Rolling On Floor Laughing Whilst Peeing In My PantsROTBA      - Reality On The Blink AgainROTF       - Rolling On The FloorROTFL      - Rolling On The Floor LaughingROTFLAS    - Rolling On The Floor Laughing And SnortingROTFLSHISMC- Rolling On The Floor Laughing So Hard I Spilt My CoffeeROTM       - Right On The MoneyRPG        - Role Playing GameRSN        - Real Soon NowRT         - Real TimeRTFF       - Read The F*cking FAQ(s)RTFI       - Read The F*cking InstructionsRTFM       - Read The F*cking ManualRTFN       - Right The F*ck NowRTFQ       - Read The F*cking QuestionRTFS       - Read The F*cking SourceRUMF       - aRe yoU Male or FemaleRUMORF     - aRe yoU Male Or Female


S

*S*        - *Smile*SAMFUTU    - Situation Abnormal More F*cked Up Than UsualSAPFU      - Surpassing All Previous F*ck UpsSAR        - Smart A*se RemarkSASS       - Short Attention Span Society/SyndromeSBID       - Sh*tty But It'll DoSEG        - Sh*t Eating GrinSEP        - Somebody Else's ProblemSFAIAA     - So Far As I Am AwareSFLA       - Stupid Four Letter AcronymSGML       - Standardised Generalised Markup LanguageSH         - Sh*t HappensSHAM       - Stay At Home MomSHTSI      - Somebody Had To Say ItSIG        - Special Interest GroupSIIK       - Stuffed If I KnowSIL        - Sister In LawSITD       - Still In The DarkSLIP       - Serial Line Interface ProtocolSMAR       - Suck My A*se RawSMO        - Serious Mode OnSMOP       - Small Matter Of ProgrammingSMOFF      - Serious Mode OFFSMTP       - Simple Mail Transfer ProtocolSNAFU      - Situation Normal All F*cked UpSNERT      - Snot-Nosed Egotistical Rude TeenagerSNR        - Signal To Noise RatioSO         - Significant OtherSOHB       - Sense Of Humour BypassSOI        - Stink On IceSOL        - Sh*t Out of LuckSOP        - Standard Operating ProcedureSOS        - Same Old Sh*t; Stuck On StupidSOVS       - SomeOne Very SpecialSPAM       - SPiced hAMSSDD       - Same Sh*t Different DayST         - Such That; Star TrekST-DS9     - Star Trek Deep Space 9ST-TNG     - Star Trek The Next GenerationST-TOS     - Star Trek The Original SeriesST-VOY     - Star Trek VoyagerSTFU       - Shut The F*ck UpSTS        - So To SpeakSUAD       - Shut/Suck Up And DealSUB        - Sign Up BoardSUCDIC     - Situation Under Control Dickheads In ChargeSUFID      - Screwing Up Face In DisgustSUNOILTY   - Shut Up No One Is Listening To YouSUYP       - Shut Up You PervertSW         - SoftWare; So What; Says WhomSWAG       - Simple Wide Ass Guess; Scientific Wide Ass GuessSWAK       - Sealed With A KissSWALK      - Sealed With A Loving KissSWDYRTW    - Since When Do You Rule The WebSWMBO      - She Who Must Be ObeyedSWYP       - So What's Your ProblemSYLA       - See You Later AlligatorSYOTB      - See You On The BoardSYSOP      - System Operator [normally of Bulletin Boards, or networks]SYT        - Sweet Young Thing


T

T&E        - Trial And ErrorTA         - Thanks A lotTAF        - That's All FolksTAFN       - That's All For NowTANJ       - There Ain't No JusticeTANSTAAFL  - There Ain't No Such Thing As A Free LunchTARFU      - Things Are Really F*cked UpTAWIS      - That Ain't What I saidTBC        - To Be ContinuedTBE        - To Be ExpectedTBYB       - Try Before You BuyTC         - Telephone Call; Take CareTCB        - Taking Care Of BusinessTCD        - The Cat's DeadTDD        - The Dog's DeadTDM        - Too Damn ManyTEHO       - To Each His OwnTFB        - Too F*cking BadTFE        - Too F*cking EasyTFS        - Three Fingered Salute [Ctrl-Alt-Del]TFTT       - Thanks For The ThoughtTGAL       - Think Globally Act LocallyTGIF       - Thank God It's FridayTGTF       - Thank God Tomorrow's FridayTHX        - ThanksTIA        - Thanks In AdvanceTIATLG     - Truly I Am The Living GodTIC        - Tongue In CheekTIME       - Tears In My EyesTIMTOWTDI  - There Is More Than One Way To Do ItTINALO     - This Is Not A Legal OpinionTINAR      - This Is Not A RecommendationTINWIS     - That Is Not What I SaidTIP        - To Insure PromptnessTJATAW     - Truth Justice And The American WayTLA        - Three Letter AcronymTLC        - Tender Loving CareTLG        - The Living GodTM         - Thread ManglerTMI        - Too Much InformationTN         - TelNetTNOTVS     - There's Nothing On Television SoTNTL       - Trying Not To LaughTNX        - ThanksTPAE       - The Possibilities Are EndlessTPS(S)     - This Program Sucks (Severely)TPTB       - The Powers That BeTRDMC      - Tears Running Down My CheeksTS         - Tough Sh*tTSOHF      - Total Sense Of Humour FailureTSR        - Terminate And Stay Resident (program,1,5,UNIX_TIMESTAMP()); Totally Stupid RulesTTBE       - That's To Be ExpectedTTBOMK     - To The Best Of My KnowledgeTTFN       - Ta Ta For NowTTKSF      - Trying To Keep Straight FaceTTL4N      - That's The Lot For NowTTM        - To The ModeratorTTSP       - This Too Shall PassTTUL       - Talk/Type To You LaterTTYL       - Talk To You LaterTTYRS      - Talk To You Real SoonTWAIN      - Technology Without An Important NameTWIAVBP    - The World Is A Very Big PlaceTWIMC      - To Whom It May ConcernTWIS       - That's What I SaidTWYAS      - That's What You All SayTWYT       - That's What You ThinkTYVM       - Thank You Very Much


U

U/L        - UpLoadUAE        - Unrecoverable Application ErrorUDP        - Usenet Death PenaltyUL         - UpLoadUOK        - yoU OK?URL        - Uniform Resource LocatorURLCM      - yoU aRe weLCoMeUSU        - UsuallyUTC        - Under The CounterUTT        - Under The TableUUCP       - Unix-to-Unix CoPyUYKD       - Unless You Know Different(ly)


V

<VBG>      - Very Big GrinVH         - Virtual HugVR         - Virtual RealityVRML       - Virtual Reality Modelling LanguageVT         - Virtual Time


W

W/         - WithW/O        - With OutW8         - WaitW8ING      - WaitingWAB        - What Another BillWAEF       - When All Else FailsWALOC      - What A Load Of CrapWAN        - Wide Area NetworkWB         - Welcome BackWCAGA      - What Comes Around Goes AroundWDYMBT     - What Do You Mean By ThatWEFT       - Wrong Every F*cking TimeWFM        - Works For Me<WG>       - Wicked GrinWGAS       - Who Gives A Sh*tWIBNIF     - Wouldn't It Be Nice IfWMMOWS     - Wash My Mouth Out With SoapWOA        - Work Of ArtWOFTAM     - Waste Of F*cking Time And MoneyWOM        - Word Of MouthWOS        - Wife Over ShoulderWR         - With RespectWRT        - With Respect ToWTAA       - What's This All AboutWTF        - What The F*ckWTFDIC     - What The F*ck Do I CareWTFDIK     - What The F*ck Do I KnowWTFDYTYA   - Who The F*ck Do You Think You AreWTFWT      - What The F*ck Was ThatWTG        - Way To Go!WTGP       - Want To Go PrivateWTH        - What The HellWTTRW      - Welcome To The Real WorldWUTNB      - Wait Until The Next BookWWW        - World Wide Web; World Wide WaitWYGIWYG    - What You Got Is What You GetWYGIWYPF   - What You Get Is What You Pay ForWYMM       - Will You Marry MeWYP        - What's Your PointWYSIAYG    - What You See Is All You GetWYSIWYG    - What You See Is What You Get


X

XYZ        - eXamine Your Zipper


Y

YABA       - Yet Another Bloody AcronymYAOTM      - Yet Another Off-Topic MessageYGGM       - Your Guess is as Good as MineYGTBK      - You've Got To Be KiddingYHB_____   - You Have Been ________YHBW       - You Have Been WarnedYHL        - You Have LostYHTBT      - You Had To Be ThereYIU        - Yes I UnderstandYIWGP      - Yes I Will Go PrivateYKYATP     - You Know You're A Tired Parent [relates to something really             silly, but if you are honest with yourself, you've done             equally silly things]YM         - You MeanYMMV       - Your Mileage May Vary [results may differ according to setup,             power, size etc]YOYO       - You're On Your OwnYOYOW      - You Own Your Own WordsYR         - Yeah RightYSS        - You Suck SeverelyYTMOB      - You Turn Me On BabyYWHOL      - Yelling Woo Hoo Out Loud [a variation on LOL(cf)]YWSYLS     - You Win Some You Lose Some


Z

ZAM        - Z's Are MeZAC        - Z's Are Calling (time for bed)ZNT        - ZiffNeTZSTFB      - Zebedee Says Time For Bed

Enviado em Referencia | Deixar um comentário »