Skip to content

How do I make regex to ignore whitespace within google searches? #442

Answered by proginosko
Hark64 asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the explanation. I understand now. I didn't know Google did that.

The solution is messy, but it would look like this:

^https?:\/+((www\.)?google\.com)\/search(.*)q=(\w+\++)*(b\+*l\+*u\+*e|g\+*r\+*e\+*e\+*n|r\+*e\+*d)

In sum, put \+* where any space might be between letters.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Hark64
Comment options

Comment options

You must be logged in to vote
2 replies
@Hark64
Comment options

@proginosko
Comment options

Answer selected by Hark64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants