Livro Expressões Regulares - Uma abordagem divertida Perl Regular Expressions by Example Introduction Regular expressions are very powerful tools for matching, searching, and replacing text. Unfortunately, they are also very obtuse. It does not help that most explanations of regular expressions start from the specification, which is like learning to love Friends reruns by reading a VCR manual. This page provides some simple examples for reference. You should know a little programming and how to run basic perl scripts before reading this article. Section 1: Basic matching and substitution Declare a local variable called $mystring. my $mystring; Assign a value (string literal) to the variable. $mystring = "Hello world!" Does the string contains the word "World"? if($mystring =~ m/World/) { print "Yes"; } No, it doesn't. Does the string contains the word "World", ignoring case? if($mystring =~ m/World/i) { print "Yes"; } Yes, it does. I want "Hello world!" $mystring =~ s/world/mom/; print $mystring; Prints "Hello mom!". Now change "Hello mom!" Okay, ignoring case, change "Hello mom!" *?
Regular Expressions Reference - Basic Syntax The regular expressions reference on this website functions both as a reference to all available regex syntax and as a comparison of the features supported by the regular expression flavors discussed in the tutorial. The reference tables pack an incredible amount of information. To get the most out of them, follow this legend to learn how to read them. The tables have six columns for each regular expression feature. The first four explain the feature. The final two columns indicate whether your two chosen regular expression flavors support this particular feature. When this legend says "all versions" or "no version", that means all or none of the versions of each flavor that are covered by the reference tables: For the .NET flavor, some features are indicated with "ECMA" or "non-ECMA". For the std::regex and boost::regex flavor there are additional indicators ECMA, basic, extended, grep, egrep, and awk. For the PCRE2 flavor, some replacement string features are indicated with "extended".
Zen-Coding – Criando HTML como um ninja! Fala pessoal! Finalmente de volta com o blog. Hoje trago até vocês uma coisinha muito da legal: o Zen-Coding, apresentado à mim pelo meu amigo implementador Bernard de Luna. O que é o Zen-Coding? Segundo o próprio site: Zen Coding é um plugin de editores para codificar e editar HTML, XML, XSL (or any other structured code format) em alta velocidade. Zen Coding is an editor plugin for high-speed HTML, XML, XSL (or any other structured code format) coding and editing. Como assim? Com o Zen-Coding você digita isso no seu editor: … aperta uma combinação de teclas, normalmente CTRL+E, e isso é automaticamente transformado em: Editores com suporte ao Zen-Coding Você pode baixar o plugin do Zen-Coding no site oficial para os seguintes editores: Nem todos são plugins oficiais, mas a maioria sim. O que mais ele faz? Vejam um exemplo que criei para vocês… Você pode expandir a seguinte linha: Em um template de site completo: Espero que vocês tenham gostado dessa ferramenta! Curtir isso: Curtir Carregando...
Perl programming documentation Remove Skype Chat History for Single Contact Introduction I wanted to clear the Skype chat history for a single user, but Skype only allows you to clear the complete chat history, not a single user's contact history. I searched for 3rd party tools on the net but nothing worked for me on Windows 7 / Skype 4.1 At the beginning, I knew nothing about how Skype stored chat history and just entered my username and password to login and chat with friends. After spending a few hours asking Google many questions, I found that Skype was using the following SQLite database to store its messages. System Drive:\<Current User’s application data folder>/Skype/<Skype username>/main.db I tried to read it with SQLitespy, but it was a pain to find and clear messages each time. Using the Code First of all, I had to find a method to deal with an SQLite database file using C#. Reference System.Data.SQLite.dll (Located in C:\Program Files\SQLite.NET\bin\System.Data.SQLite.dll) to allow C# to deal with the SQLite database file.
Sistema de busca em PHP e MySQL com paginação Hoje vou demonstrar como podemos criar um sistema de busca simples para o seu site. O sistema de busca aqui explicado consiste em duas coisas: o formulário de busca, que pode ir em qualquer lugar do seu site (topo/lateral) e a página de resultados da busca, que exibirá um resultado parecido com o do Google. A busca será feita no título e no conteúdo das notícias cadastradas no banco de dados, em uma tabela chamada notícias. Veja um exemplo (imagem) de como ficará o resultado da busca sem CSS. Veja o código de criação da tabela: As colunas da tabela serão: id, titulo, texto, ativa (1 ou 0), e cadastro (AAAA-MM-DD HH:MM:SS). Esta é uma estrutura simples de uma tabela de notícias, e você vai precisar adaptar o script para a sua tabela caso queira usar uma pronta. Vamos ao formulário de busca: Não se esqueça de alterar o action para o endereço certo do seu site… Se você preferir, pode definir o action usando caminho relativo, não há diferença. E pra quem quiser o mesmo script com paginação:
retut <div class="noscript"><p><strong>Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled, or are running a non-JavaScript capable web browser.</strong></p><p> To get the best experience, please enable JavaScript or download a modern web browser such as <a href=" Explorer 8</a>, <a href=" <a href=" or <a href=" Chrome</a>. </p></div> perlretut - Perl regular expressions tutorial This page provides a basic tutorial on understanding, creating and using regular expressions in Perl. Perl is widely renowned for excellence in text processing, and regular expressions are one of the big factors behind this fame. What is a regular expression? A note: to save time, 'regular expression' is often abbreviated as regexp or regex. "#!
BryanCockerham.com :: Projects SkypeX Beta* | Delete your Skype messages Role: Concept, design, development Have you ever: Typed something you wished you hadn't? Complained about your boss via Skype™ on your work computer? Spoken about another job opportunity? Said something really harsh? Regular price $19.99, beta price $4.99 I'm hoping future releases will include: - Backup of Skype™ conversations - A Skype™ conversation export tool Questions? Only $4.99 Purchase and download in 2 minutes! Works on: Windows 7 | Windows Vista | Windows XP Simple to use: Enter your Skype™ Username Choose a Skype™ conversation Select messages you wish to delete by clicking the gray area on the left. Requires Microsoft .NET Framework version 3.5 or greater. * Although tested, this product is in beta. SkypeX Beta* is not in any way affiliated with or endorsed by Skype™
Count This lesson will teach you how to use the aggregate function COUNT(). If you missed the Aggregate Introduction Lesson, please check it out now, as it explains many concepts used in this lesson! We will be using the "products" table that we constructed to display the use of MySQL's COUNT function. You can download the products.sql file from our website. If you are new to MySQL you will need to know how to Create a MySQL Table and Insert a MySQL Row first. Below is the MySQL table "products". Products Table: The COUNT function is an aggregate function that simply counts all the items that are in a group. Just as we did in the aggregate introduction lesson, we are going to GROUP BY type to create four groups: Music, Toy, Clothing and Food. PHP and MySQL Code: <? Display: There are 2 Clothing items. If you would rather download the PDF of this tutorial, check out our MySQL eBook from the Tizag.com store. Report a Bug or Comment on This Lesson - Your input is what keeps Tizag improving with time!