English 中文(简体)
定期表达角逐关键词
原标题:Regular expression for google keyword
  • 时间:2012-04-19 11:14:23
  •  标签:
  • expression

我正在尝试定期表达,以发现山洞搜索中的关键词。 i.e. 从奥古格尔到“阿马齐格车”搜寻用地

https://www.google.pl/#hl=pl&output=search&sclient=psy-ab&q=amazing+car&oq=amazing+car&aq=f& ... etc

我用这一定期表述试图发现一辆关键词车:

(google.).+(&|?)q=(car)

But this does not seem to work correctly. Am I missing something? Thank you very much for advice

最佳回答

你的表述只有在问问问问问问问开始时才会吻合。 如果在这批人中使用“.*”,则 gr的+将使“q=”与“oq=”相匹配。

可为您工作:

(google.).+(&|?)q=([^&]*car)

或者,虽然比较复杂,但更为安全,适用这一条例,其中将反映唯一捕获组的关键词:

https?://(?:[^/]+.)?google.[^/]+/[^?]*[?#](?:.*&)?q=([^&]*)

或者,如果您的舱面发动机不支持,非资本团体则使用:

https?://([^/]+.)?google.[^/]+/[^?]*[?#](.*&)?q=([^&]*)

页: 1

问题回答

暂无回答




相关问题
php - regex hostname extraction

I have been looking around for a regex expression that will spit out just the stackoverflow part and no www. or .com etc. All I could find was to check if the url s were valid... I have used php s ...

Linq Query Expression reuse

Post Edited Would this be possible ? Have a query expression that is precompiled i.e private static Func<SmwrDataContext, int, IQueryable<Xyz>> _validXyzs = CompiledQuery.Compile((...

JSP EL (Expression Language) causing problems in Eclipse

My system: Ubuntu 9.10. Eclipse 3.5.1 with Java EE 1.2.1 (manual install - NOT from synaptic). Web Developer Tools 3.1.1 I ve recently adopted someone else s code (a Dynamic Web Project), and run ...

Scripting After Effects

I need to learn Affect Effect expressions and scripting fast. Can you recommend any resources on this topic? I ve got a pretty knowledge of other scripting concept and languages like javascript. I ...

Embed a JQuery expression inside a css file?

As the question implies, can I add a JQuery script inside an css file as an expression? Or something like: .parent{ background-color: pink; position:relative; width: 100%; } .child{ ...

Boolean Expression Evaluation in Java

I m looking for a relatively simpler (when compared with writing a parser) way to evaluate boolean expressions in Java, and I do not want to use the JEP library. I have a String expression like: (x &...

Are these jQuery expressions equivalent?

I m wondering if these two expressions are equivalent, because if they are, it would make this much easier. $( div , this).filter( :not(.trigger) )... $( div:not([class*=trigger]) , this)... (this ...

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

热门标签