Meta tags:
Headings (most frequently used words):
programming, regex, patterns, java, reply, posts, logic, basic, in, perl, algorithms, computer, science, and, puzzles, implementation, post, navigation, leave, cancel, about, the, author, find, me, elsewhere, popular, categories, recent, archives,
Text of the page (most frequently used words):
the (46), character (17), you (15), match (15), will (14), and (13), string (12), 2013 (11), pattern (11), basic (10), means (10), #programming (9), java (9), can (9), 2014 (8), for (8), regex (8), any (8), matcher (8), with (7), times (7), patterns (6), your (6), appearing (6), use (6), class (6), commands (5), find (5), are (5), characters (5), found (5), 2012 (4), september (4), 2016 (4), from (4), node (4), using (4), perl (4), this (4), email (4), end (4), many (4), classes (4), that (4), system (4), out (4), println (4), november (3), december (3), january (3), april (3), june (3), february (3), october (3), javascript (3), facebook (3), code (3), how (3), heroku (3), puzzles (3), project (3), euler (3), algorithms (3), problem (3), name (3), website (3), not (3), target (3), twice (3), most (3), except (3), anything (3), instance (3), washington (3), com (2), all (2), 2011 (2), march (2), may (2), july (2), 2017 (2), example (2), another (2), php (2), posts (2), linux (2), challenges (2), sockets (2), simple (2), numbers (2), algorithm (2), profile (2), daniel (2), scocco (2), located (2), comment (2), reply (2), solution (2), line (2), specify (2), exactly (2), should (2), matched (2), more (2), least (2), but (2), quantifiers (2), which (2), predefined (2), used (2), whitespace (2), alphanumeric (2), intersection (2), different (2), through (2), range (2), metacharacter (2), inside (2), abc (2), ashington (2), brackets (2), given (2), try (2), possible (2), public (2), str1 (2), start (2), index (2), writing (2), logic (2), copyright, programminglogic, rights, reserved, august, 2015, archives, modern, development, jsonp, getting, data, domain, webhook, integration, git, deploy, app, event, driven, resources, tutorials, express, mondodb, list, ffmpeg, mongodb, timezone, problems, date, objects, running, apps, locally, port, connect, recent, uncategorized, tricks, tools, sql, python, probability, oop, number, theory, networking, lisp, scheme, google, jam, games, hackers, cup, combinatorics, codechef, book, reviews, bitwise, stuff, assembly, categories, udp, datagrams, client, server, program, tcp, fast, exponentiation, poker, game, computers, represent, negative, binary, gdb, shell, mysql, powerset, sieve, eratosthenes, implemented, implementing, huffman, coding, knapsack, dynamic, popular, stackoverflow, github, danielscocco, elsewhere, programmer, entrepreneur, brazil, hobby, projects, samples, interesting, solutions, come, across, about, author, save, browser, next, time, required, fields, marked, address, published, leave, cancel, post, navigation, entry, was, posted, beginning, word, boundary, previous, needed, where, specifying, locations, zero, one, once, five, three, sequences, looking, appear, there, several, make, job, easier, ones, digit, digits, symbol, before, nested, element, won, because, empty, compose, union, two, achieve, nesting, unions, intersections, want, include, hyphen, form, negates, ice, dice, bice, negation, either, create, disjuntion, separated, part, also, called, look, without, capital, letter, remember, escape, metacharacters, backslash, dot, box, boxe, well, boxp, test, testtest, literal, basically, exact, literals, import, util, text, static, void, main, args, boolean, false, united, states, compile, while, true, group, return, here, sample, uses, library, implementation, below, edit, replace, strings, flavor, might, slightly, language, platform, improve, skills, minutes, day, newsletter, daily, tips, computer, science,
Text of the page (random words):
basic regex patterns in java perl programming logic programming logic algorithms computer science and programming puzzles basic regex patterns in java perl improve your writing skills in 5 minutes a day with the daily writing tips email newsletter below you ll find the basic regex patterns you can use to match edit and replace strings i am using the java perl regex flavor so the patterns might be slightly different if you are using another programming language or platform java implementation here s a simple java sample that uses the regex library it will try to match the given pattern on a string as many times as possible import java util regex public class text public static void main string args boolean found false string str1 washington is located in the united states pattern pattern pattern compile ww ashington matcher matcher pattern matcher str1 while matcher find found true system out println found matcher group system out println start index matcher start system out println end index matcher end if found system out println no match found return regex patterns 1 string string literals the most basic pattern you can use is a string literal it will basically try to match the exact pattern on the target string as many times as possible test will be matched twice on the string testtest 2 metacharacter the will match any given character so the pattern box will match boxe as well as boxp the pattern will match a b and c on the string abc remember that you can escape metacharacters with a backslash so will match a dot in the target string 3 character class you can use brackets to create a disjuntion on your pattern i e a separated part which is also called a character class the matcher will look for any of the characters inside the brackets for instance this can be used to match a string with or without a capital letter ww ashington will match either washington or washington 4 negation the metacharacter negates the characters inside a character class so abc ice will match dice but not bice 5 a d range if you want to include many characters or numbers on your character class you can use the hyphen to form a range for instance a d will match any character from a through d 6 unions and intersections you can compose a character class from the union of two different classes you achieve that by nesting the classes a c d f will match any character from a through f for the intersection you use the symbol before the nested element for instance a c d f won t match anything because the intersection is empty 7 predefined classes there are several predefined classes that will make your job easier the most used ones are any character d any digit d any character except digits s whitespace s anything except whitespace w any alphanumeric character w anything except alphanumeric characters 8 quantifiers you can use quantifiers to specify how many times or in which sequences the characters you are looking for should appear a means the character a appearing zero or more times a means the character a appearing one or more times a means the character a appearing once or not at all a 5 means the character a appearing exactly five times a 2 means the character a appearing at least twice a 2 3 means the character a appearing at least twice but at most three times 9 specifying locations if needed you can specify exactly where your pattern should be matched on the target string means at the beginning of the line means at the end of the line b means word boundary g means the end of the previous match this entry was posted in java on december 6 2013 by daniel scocco post navigation solution to problem 29 on project euler solution to problem 30 on project euler leave a reply cancel reply your email address will not be published required fields are marked comment name email website save my name email and website in this browser for the next time i comment about the author my name is daniel scocco and i am a programmer and entrepreneur located in brazil on this website you ll find my hobby programming projects code samples i find interesting and solutions to programming puzzles and challenges i come across find me elsewhere danielscocco com github profile stackoverflow profile popular posts knapsack problem dynamic programming algorithm implementing huffman coding in c the sieve of eratosthenes implemented in c powerset algorithm in c mysql basic commands basic linux shell commands basic regex patterns in java perl gdb basic commands how computers represent negative binary numbers simple poker game in c fast exponentiation algorithms example of client server program in c using sockets and tcp sockets programming in c using udp datagrams categories algorithms assembly bitwise stuff book reviews c c challenges codechef combinatorics facebook hackers cup games google code jam heroku java javascript linux lisp scheme networking number theory oop php probability project euler puzzles python sql tools tricks uncategorized recent posts running heroku apps locally on port 80 with facebook connect mongodb and node js timezone problems with date objects list of basic ffmpeg commands resources and tutorials for node js express js and mondodb event driven programming with node js how to deploy a node js app to heroku git basic commands facebook webhook integration code in php jsonp example getting data from another domain with javascript modern javascript development archives october 2017 september 2017 november 2016 october 2016 september 2016 june 2016 february 2015 september 2014 august 2014 july 2014 may 2014 april 2014 march 2014 february 2014 january 2014 december 2013 november 2013 october 2013 september 2013 july 2013 june 2013 may 2013 april 2013 february 2013 january 2013 june 2012 april 2012 march 2012 january 2012 december 2011 november 2011 copyright programminglogic com all rights reserved
|