Miscellaneous

Lookaround Assertion | Regular Expression

Introduction Lookahead and lookbehind, collectively called "lookaround", are zero-length assertions just like the start and end of line. Lookaround actually matches characters, but then gives up the match, returning only the result: match or no match. They do not consume characters in the string, but only assert whether a match [...]

2019-10-20T16:34:38+05:30Categories: Miscellaneous|Tags: |

Backreferences | Regular Expression

Introduction Backreferences match the same text as previously matched by a capturing group. Suppose you want to match a pair of opening and closing HTML tags, and the text in between. By putting the opening tag into a backreference, we can reuse the name of the tag for the closing [...]

2019-10-13T13:31:14+05:30Categories: Miscellaneous|Tags: |

Capturing Groups | Regular Expression

Capturing Group Capturing groups are a way to treat multiple characters as a single unit. They are created by placing the characters to be grouped inside a set of parentheses. For example, the regular expression (dog) creates a single group containing the letters "d" "o" and "g". The portion of [...]

2019-10-13T13:05:47+05:30Categories: Miscellaneous|Tags: |

Word boundaries | Regular Expression

The metacharacter \b is an anchor like the caret and the dollar sign. It matches at a position that is called a "word boundary". This match is zero-length. It is common to call an alphanumeric sequence a word. All characters that are not "word characters" are "non-word characters". Different positions [...]

2019-10-13T12:20:19+05:30Categories: Miscellaneous|Tags: |

Anchor Characters | Regular Expression

The caret (^) is the starting anchor, and the dollar sign ($) is the end anchor. The regular expression ^A will match all lines that start with an uppercase A. The expression A$ will match all lines that end with uppercase A. If the anchor characters are not used at [...]

2019-10-13T13:06:58+05:30Categories: Miscellaneous|Tags: |

Alternation | Regular expression

Alternation meta character (|) can be used to match a single regular expression out of several possible regular expressions. Since regex engine is eager to find the match. It stops searching as soon as it finds a valid match. The consequence is that in certain situations, the order of the [...]

2019-10-13T13:12:55+05:30Categories: Miscellaneous|Tags: |

Quantifiers | Regular Expression

Introduction Quantifiers can be used to specify number of times a token should be matched by the regex engine. Below are common qualifier used in regular expression ? : Match the token zero times or exactly once* : Match the token zero or more times+ : Match the token one [...]

2020-04-18T23:37:51+05:30Categories: Miscellaneous|Tags: |

Meta characters | Regular Expression

Introduction Meta characters are the building blocks of regular expressions. Characters in RegEx are understood to be either a meta character with a special meaning or a regular character with a literal meaning. The following are some common RegEx meta characters and examples of what they would match or not [...]

2020-04-18T23:41:27+05:30Categories: Miscellaneous|Tags: |

Modes | Regular Expression

By default, the comparison of an input string with any literal characters in a regular expression pattern is case sensitive. This and several other aspects of default regular expression behaviour can be modified by  specifying regular expression options i.e. Matching modes. Usually they are specified outside the regular expression. Common [...]

2019-10-13T13:13:01+05:30Categories: Miscellaneous|Tags: |

Book Summary : Where Good Ideas Come From

Introduction Measure of innovation There are many ways to measure innovation, but perhaps the most elemental yardstick, at least where technology is concerned revolves around the job that the technology in question lets you do. All other things being equal, a breakthrough that lets you execute two jobs that were [...]

2019-06-30T23:21:34+05:30Categories: Miscellaneous|
Go to Top