lookaround
PHP Regular Expression NOT starting with.. negative lookbehind not working?
I am trying to extract a nameserver. The format of $output is such that it contains ns1.nameserver.com for example.[详细]
2023-03-28 06:23 分类:问答Consuming a Lookaround or Ignoring a Non-Capture in a Regex match
Consider the following string: ABC. I would like to capture the following groups using a regula开发者_开发知识库r expression:[详细]
2023-03-24 05:51 分类:问答regex: match lines that don't match sub-regex
Let\'s say I have a regex expression foobar and I want to find all lines in a document that contain no match to foobar.Can I do this?开发者_如何学运维How do I do this?^(?!.*foobar.*).+$[详细]
2023-02-22 19:40 分类:问答How does this regex replacement reverse a string?
This is the fourth part in a series of educational regex articles. It show how the combination of nested reference (see: How does this regex find triangular numbers?) to "count" within asse[详细]
2023-01-16 07:12 分类:问答How does this Java regex detect palindromes?
This is the third part in a series of educational regex articles. It follows How does this regex find triangular numbers? (where nested references is first introduced) and How can we match a^n b^n wi[详细]
2023-01-15 00:55 分类:问答RegEx: Find word after a letter but don't include the letter in the result
Here\'s a string that I may have: 开发者_如何学Go(MyStringIsOneWholeWord *) I have used the following javascript regular expression to get the text after the bracket if it starts with My.[详细]
2023-01-14 20:32 分类:问答Regex optimization question
As a personal learning exercise, I wrote this regex to split a unary string int开发者_开发百科o parts whose length is increasing powers of two (see also on ideone.com):[详细]
2023-01-06 18:25 分类:问答How does the regular expression ‘(?<=#)[^#]+(?=#)’ work?
I have the following regex in a C# program, and have difficulties understanding it: (?<=#)[^#]+(?=#)[详细]
2023-01-04 03:21 分类:问答Regex lookahead, lookbehind and atomic groups
I found these things in my regex body but I haven\'t got a clue what I can use them for. Does somebody have examples so I can try to understand how they work?[详细]
2023-01-02 01:19 分类:问答Stop matching when meeting a sequence of chars: fixing a lookbehind
I have the following regexp: (?P<question>.+(?<!\\[\\[)) It is designed to match hello world! in the string hello world! [[A string typically used in programming examples]][详细]
2022-12-25 06:56 分类:问答