Tutorial by Examples

.* in regex basically means "catch everything until the end of input". So, for simple strings, like hello world, .* works perfectly. But if you have a string representing, for example, lines in a file, these lines would be separated by a line separator, such as \n (newline) on Unix-like s...
Consider this example: He went into the cafe "Dostoevski" and said: "Good evening." Here we have two sets of quotes. Let's assume we want to match both, so that our regex matches at "Dostoevski" and "Good evening." At first, you could be tempted to keep...

Page 1 of 1