Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

28

You can use REGEXMATCH: =IF(REGEXMATCH(A1, "sites"), 1, 0) To explain, REGEXMATCH returns true if and only if the argument is a substring of your string.


24

This feature is not available in classic Google Search and it's not in Google's roadmap. You can learn more about this topic watching the Google video Will Google implement the ability to search with regular expressions? However, there's one exception. Google Code Search supports regular expressions. Of course, the search target for this topic search engine ...


10

Google Search can return the matches of some simple regular expressions. For example, the search query "(gray|red) (wolf|fox)" appears to be equivalent to ("gray wolf" OR "red fox" OR "red wolf" OR "gray fox") You can see the output of this search query here.


7

SymbolHound has an open source code repository search, similar to the now-discontinued Google Code Search option, in addition to a symbol-inclusive web search that indexes programming-related sites such as Stackoverflow.


6

This formula will do the job: =regexextract(A1;"@(.*)") If no @ is found, the original value is shown. The =regexextract function (documentation) executes the regular expression parameter (@(.*)) against the value of cell A1, and returns the matching group.


6

I was just looking for a similar feature in IFTTT, but then discovered that Zapier (kind of) supports this. They're not proper regex's but it does pattern matching of sorts https://parser.zapier.com Might be good enough for what you need!


6

=if(search("sheets",B2)>0,1,0) =if(IFERROR(search("sheets",B2)>0,0),1,0) Both work. The second writes a 0 if there's an error.


5

The short answer is: no, you can't do this. The long answer: IFTTT does not have a regular expression scraper, at least as of this tweet: https://twitter.com/grmeyer/status/240888420677873664 IFTTT does not legitimately let you create your own THIS conditions or THAT actions. Illegitimately, you can use https://github.com/captn3m0/ifttt-webhook to create ...


5

You can write a piece of software to: Take the keywords from the regular expression; Google the keywords and get a list of results; Crawl each resulting URI and filter it with complete regular expression. Let's study a case: from site:gog.com find all games that have Spanish voice-over. The regular expression is: Audio[^:]*:[^.,]*Spanish It shall match, ...


4

No, unfortunately not :(. In theory you could make your own search engine and do it, but that would be pretty hard.


4

You just need to use the backslash to escape the period character, so you have one of two options: for regexextract to capture everything after the period, thus ignoring everything before it: =REGEXEXTRACT(A1,"\.(.*)") or regexreplace to replace everything including and before the period: =REGEXREPLACE(A1,"(.*\.)","")


4

I would use the following formula to obtain an URL. Formula =IF(ISEMAIL(A2), REGEXEXTRACT(A2,"@(.+)"), IF(ISURL(A2), A2, IF(ISURL(REGEXEXTRACT(A2,"@(.+)")), REGEXEXTRACT(A2,"@(.+)"), "No valid entry" ) ) ) Copy / Paste =IF(ISEMAIL(A2),REGEXEXTRACT(A2,"@(.+)"),IF(ISURL(A2),A2,IF(ISURL(REGEXEXTRACT(A2,"@(.+)")),...


3

If your email address (bob@example.com) is in A1 =index(split(A1,"@"),0,2) = example.com =index(split(A1,"@"),0,1) = bob You are splitting on the @ and than using index to select which column you want from the split.


3

It is possible to search Wikipedia (or any other site that a search engine can access) using simple regular expressions, as long as you rely on an search engine. The following Google search query searches Wikipedia for matches of the regular expression (Yahoo|Google|Microsoft): https://www.google.com/#hl=en&sclient=psy-ab&q=site:en.wikipedia.org+(...


3

Two solutions here: Google Drive Spreadsheet - Continue with using the speadsheet as linked, but limit the search area to avoid hitting the "Exceeded maximum execution time". Download via IMAP 1. Google Drive Spreadsheet It's possible via a Google Drive Spreadsheet. The original credit for Regular Expression based search of Gmail emails goes to Labnol....


3

You can find them using find and replace if you go to view -> all formulas (ctrl+') and then do you "round( " find this will at least cut down on the manual labor of it all I couldnt find a way (using find and replace to search for wild card value though EDIT: Try out the script below REF: http://www.google.com/support/forum/p/Google%20Docs/thread?tid=...


3

Short answer Instead of using the built-in find and replace function use Google Apps Script or an add-on. Explanation On the Find and Replace feature of Google Documents, the Replace part doesn't work with regular expressions and it doesn't work either with the replaceText() method from the Documents Service in Google Apps Script fortunately JavaScript ...


3

Please try: =sumproduct(($J$6:$J)*($A$6:$A="Order")*(regexmatch($G$6:$G,"T8")))


3

Contrary to what I had concluded earlier, "where 'string' matches B" works: Description Expected Category Inferred Category bla 1 cat1 =query(A$1:B$3, "select C where '" & A8 & "' matches B limit 1") bla 2 cat2 =query(A$1:B$3, "select C where '" & A9 & "' matches B limit 1") bla blue 2 cat2 ...


3

You could try splitting this into two parts returning the latter part as upper. Not sure how to nest the upper inside the regex in Gsheets. =REGEXEXTRACT(A1,"stri") & upper(REGEXEXTRACT(A1, "(ng)")) this returned for me: string > striNG


2

No, it's not possible to do so.


2

Just a guess, but OP may want something like this: =query(A:A, "Select A where A matches '.*/[A-Z]+/.*' ") to select from ColumnA only cells containing nothing but Latin alphabet upper case letters between two virgulas suspensiva (forward slashes) whether or not in the context of other characters.


2

The issue in this case appears to be that you put double quotes and single quotes around the cell reference, try this, should fix it. =REGEXREPLACE(sheet2!A2, " .*", "xxx")


2

If you're only interested in doing a regex search of Wikipedia titles, Crossword Nexus allows you to do that. http://crosswordnexus.com/wiki


2

You could try something like this: =COUNTA(SPLIT(REGEXREPLACE(A1,"something","$ ."),"$")) This replace the regex pattern your looking for with a symbol, then counts the number of times it occurs in your string, but counting the number of cells it splits into. note: the extra space and the period at the end of the regexreplace, is there in case your ...


2

Google Search doesn't allow searching for punctuation characters. Further, the asterisk (*) acts as a wildcard character in searches. For instance * tart recipe Should return recipes for apple tarts, pear tarts, cherry tarts, etc. Google's own example from the search operators support page is a * saved is a * earned (That page also lists other special ...


Only top voted, non community-wiki answers of a minimum length are eligible