Regex

Using Subexpressions in RegEx

We need subexpressions for complex and refined output. We can refine our output by grouping the expressions.  E.g. Test Case – HelloHello  RegEx – Hello{2,} Result – Hello{2,} It will not match any Hello because above expression is finding 'Hell' and atleast two occurence of 'o'. So, we need to create Read more…

By faltutech, ago
Regex

Position Matching RegEx

Using Boundaries : Position matching is used to specify where within a string of text a match should occur.  To understand the need for position matching,consider the following example: TEXT The cat scattered his food all over the room. REGEX cat RESULT The cat scattered his food all over the Read more…

By faltutech, ago
Regex

Using Metacharacters in RegEx

Escaping : Metacharacters are characters that have special meaning within regular expressions. The period (.) is a metacharacter; it is usedto match any single character. Similarly, the left bracket ([) is a metacharacter; it is used to mark the beginning of a set. Because metacharacters take on special significance when Read more…

By faltutech, ago