regex-negation
.NET regular expressions how to match a string that does not contain a word at a specific position
If I have a text line such as \"so and so bit mike\" where so and so could be any group of words with any group of spaces in it, what would a regular expression look like that would match[详细]
2023-03-23 16:30 分类:问答URL validation regex allows one case I'd like to disallow
Here is my regex: ^(?#Protocol)((ht)tp(s?)\\:\\/\\/|~\\/|\\/){1}((?#IP Address)(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?#Subdomains)(([-\\w]+\\.)+(?#TopLevel Domains))([a-z]+))(?#Port)(:[\\d]{1,[详细]
2023-03-21 07:16 分类:问答Translate this if statement in to regex
I had to translate the following if statement in to a regex so we could use it on a whole string if (buffer[i] < 32 && !(buffer[i] == \'\\t\' || buffer[i] == \'\\r\' || buffer[i] == \'\\n\[详细]
2023-03-16 05:09 分类:问答Regular expression to match content until multi-character string
I\'ve got defective input coming in that looks like this... foo<p>bar</p> And I want to normalize it to wrap the leading text in a p tag:[详细]
2023-03-13 13:21 分类:问答Regex inverse matching on specific string?
I would like to match the following com.my.company.moduleA.MyC开发者_开发问答lassName com.my.company.moduleB.MyClassName[详细]
2023-03-11 09:35 分类:问答Regex to match keyword if not enclosed by curly braces
In a PHP variable I have some text that contains some keywords. These keywords are currently capitalised. I would like them to remain capitalised and be wrapped in curly brackets but once only. I am t[详细]
2023-03-07 11:36 分类:问答Regex that says what NOT to match?
I’m wondering how to match any characters except for a particular string (call it \"for\") ina regex.[详细]
2023-03-04 21:37 分类:问答Extending regular expression syntax to say 'does not contain text XYZ'
I have an app where users can specify regular expressions in a number of places. These are used while running the app to check if text (e.g. URLs and HTML) matches the regexes. Often the users want to[详细]
2023-03-02 17:28 分类:问答GREP REGEX for EnCase - Date conversion
How do I convert February 2, 2002 at 10 to GREP REG开发者_Go百科EX for EnCase Forensics? ThanksI don\'t know EnCase Forensics and given the astounding number of answers here, I am not alone...[详细]
2023-03-01 22:45 分类:问答How to match string, which does NOT contain a word?
To match string, which contains some word, I can use pattern \"/.*word.*/\". But how do I match a string, which does not contain this word?[详细]
2023-03-01 21:56 分类:问答