|
|
Search
You searched for the word(s):
Showing page 1 of 275 (2,743 total posts)
< 1 second(s)
-
You don't say what regex variant you are using so I have no idea if this will work or not but I have tried to use fairly commonly available syntax.
Try the pattern:
\[\{\{address\sline
(\|(
1\s*=\s*(((?![|}]).)*)
|
2\s*=\s*(((?![|}]).)*)
))+\}\}\s*
(((?!]).)*)\]
which I have split over several lines for readability. You ...
-
You are asking to do something that is actually not possible with a "standard" regex - this is known as a "balanced parentheses" problem and requires that the regex engine has some ability to "count" which generally they don't.
However there are 3 (and a bit) exceptions. The .NET and PCRE library have (different) ...
-
First things first - trying to parse HTML (or XML for that matter) using a regex expression is almost always going to end in tears. HTML is just too variable and, depending on how it is generated, it can contain things that are (possibly) valid HTML but cannot be anticipated with a regex expression. The way to parse HTML (or XML) is to ...
-
Can you please let us know the regex variant you are using - unfortunately they are not all the same and the pattern I have suggested below may or may not work for you.
I think I have come close with:
(\x20\x20|^)E(?!/)[\w/]*(\x20\x20|\r?$)
with the 'multiline' options set (and the 'ignore case' not set - it doesn't matter ...
-
Sorry - my mistake. I was testing out both patterns and I must have copy and pasted the wrong one. It shuold be:
(http|ftp|https):\/\/[\w.]*?facebook.com([\w\-.,@?^=%&:/~+#]*([\w\- @?^=%& /~+#]))?
Also, if you tried to simply remove the '!' then 1) it would not have worked but 2) it shows that you probably have ...
-
OK, for the first pass to look for the facebook URLs, try:
(http|ftp|https):\/\/(?![\w.]*facebook.com)[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&:/~+#]*([\w\- @?^=%& /~+#]))?
with the replacement text:
<a href=\"$0\" target=\"blank\">facebook</a>
and the "ignore case" option ...
-
What you want to do should be fairly straight forward. However I have little knowledge of how to detect a facebook URL - can you please let me know what the URLs look like. (I'm guessing that the contain xxx.facebook.com but I am not sure).
Also I am not clear what you are wanting to end up with at the end. ...
-
I must admit that I thought the "perl" and 'grep" were two separate things until I looked it up just now. Therefore I must also assume that the "perl grep" operator uses standard perl regex pattern operators.
Given all that, have you tried the pattern mentioned above, namely
/\/\d+$/
Without examples of the text ...
-
The key issue here is likely to be the regex variant that is being used and the various capabilities it may have. (Unfortunately regex engines are NOT all the same).
I am assuming that you are using some file search tool that can filter file names based on some regex pattern. Therefore we really need ...
-
Try:
^(\d{4}-\d{2}-\d{2})((?!(\d{4}-\d{2}-\d{2}|UTV\d{3})).)*UTV\d{3}
with the "singleline" and "multiline" options set.
You don't say what regex variant you are using so the above pattern assumes that you can use lookaheads (a fairly common capability).
The way it works is as follows:
^ - with the ...
1 ...
|
|
|