Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [regex]

regex stands for "regular expressions". They are used to define a string search pattern that could be used in some web applications like Google editors to do input validation, search and replace among other similar tasks.

0
votes
0answers
9 views

How to efficiently use “Text Parser Module” to fetch table data from emails in Integromat

I've recently signed up for automation website called Integromat, that contains modules to link different web apps and all. My question is, how do I fetch table data from an email and save it in ...
0
votes
1answer
10 views

Can anyone help me understand how to use Regular Expressions for Google Analytics?

I have been to over a dozen sites that claim to offer to help a user understand how to use RegEx, but those sites don't offer any type of working examples that are useful. I need to learn how to ...
0
votes
0answers
11 views

XPath to a div with dynamic id on Facebook

I have created a simple iMacros automation flow to get the embed code for each given Facebook post ID. I used XPath to find the menue button on the top right of the post and then automatically click ...
1
vote
3answers
71 views

How can I use the capturing group in a function?

=REGEXREPLACE("string", "(ng)", UPPER("$1")) The above returns "string", but should return "striNG". I suspect that this is because UPPER is capitalizing the string "$1" rather than the string with ...
0
votes
1answer
17 views

split rows dynamically based on row length (COUNTA) and transpose to 2D array

I have data in this format: and I need it to be reformatted into this: Basically, each row in the initial format is composed of 4 concatenated sections of equal lengths: Part(s), Product(s), Quant(s)...
0
votes
1answer
33 views

DPL3 RegEx: How to suppress display of matched parameters?

I'm trying to match {{Tag|Anteater}} Regarding https://help.gamepedia.com/DPL:Parameters:_Criteria_for_Page_Selection#includematch, and https://help.gamepedia.com/DPL:Parameters:...
0
votes
1answer
115 views

Regex compare two strings

I have two strings "*j?a?c?k*c?o?o?p?e?r*a?v?o?n*l?a?k?e*o?h*" and "*j?a?c?k*c?o?o?p?e?r*t?r?a?n?s?p?o?r?t*a?v?o?n*l?a?k?e*t?e?r?m?i?n?a?l*" These seem like they should be equal in regex. However, ...
0
votes
1answer
1k views

How to manipulate text strings in Google Apps Scripts

I've found this super userful code that I have managed to add to a Google Sheet (total newbie here) but I have a couple of problems. The first is to disregard blanks. I want to select a list, get ...
1
vote
1answer
229 views

Google Sheets: REGEXEXTRACT Formula to remove characters not inside [brackets] but leave , commas?

I'm trying to create a formula that uses either =REGEXEXTRACT or =REGEXREPLACE to remove all characters not inside [brackets] but leaving the ,,, commas where they are. For example... ➜ Text to ...
0
votes
3answers
41 views

create a regex for Google Analytics, to tack a specific US phone number that can be in multiple formats

I want to write a regular expression to tack a number in Google Analytics for a specific US phone number that supports the following formats: ###-###-#### (###) ###-#### ### ### #### ###.###.#### ...
0
votes
0answers
21 views

More than two decimal places for currency in Cognito Forms

I'm trying to create Cognito Form field in which users can enter a dollar amount with three decimal places, e. g. "$.545". Since Cognito Form currency fields only allow two decimal places, what is ...
3
votes
2answers
583 views

Search a text for specific text, then multiple if statements depending on what's there

I've got a weird question about Google Sheets. First, here's what I've got so far, but it returns an error "Function REGEXEXTRACT parameter 2 value "My Text here" is not a valid regular expression." ...
1
vote
3answers
87 views

Google Sheets - REGEX Challenge

I have a long Google Sheet column of cells with content looking like this: #text: Jacob Zuma @domain: https://www.theguardian.com/world/zuma #text: World news @domain: https://www.theguardian.com/...
0
votes
1answer
100 views

Google Analytics Exclude URI filtering

I have a tracking code which is currently used on two ORACLE APEX webapplications. (210 and 400). I have made a view in Google Analytics, which contains a filter that should exclude the 400 ...
1
vote
1answer
253 views

Matching a cell value to a category from patterns table

I'm trying to categorize a cell value in Google Spreadsheets, based on a categories table, so that depending on the value in the cell, the correct category will be determined. Given a categories ...
1
vote
2answers
183 views

How do I use regexmatch inside sumproduct?

This works: =sumproduct($J$6:$J,($A$6:$A="Order")*($G$6:$G="T8")) This does not. =sumproduct($J$6:$J,($A$6:$A="Order")*(Regexmatch($G$6:$G,"T8")) produces formula parse error. This =regexmatch(...
1
vote
2answers
142 views

Preventing certain words from appearing on a Google Sheets

Let's say that I have a big Google spreadsheet that multiple users have access to, and I'm not able to control which users have access to it. I have a concern for trolls. How would I prevent people ...
0
votes
1answer
363 views

Match strings with more than one character in Google Sheets

I have the following query: =QUERY('Data'!A2:F,"SELECT A, B, F WHERE C=''") In column E I also have strings which correspond to last names. I want to select all rows where the string in E has more ...
1
vote
1answer
219 views

How to regex extract alpha portion immediately after an underscore in Google Sheets?

Using Google sheets, here's what I'm trying to accomplish: I have data that comes in like this: xta_GAM-1a (61095) xta_SM (61096) xta_GAM2 (61156) xta_GAM-1b (61161) AO CPC ALL GAM AO CPC ALL PA AO ...
0
votes
1answer
233 views

Regular Expressions

I am experimenting with Cognito Forms' new feature of text input validation by use of Custom Regular Expressions. I was asked by one of our departments to make the name fields autocorrect so as to ...
0
votes
1answer
71 views

Sort QUERY results to the 4th character of a string

I'm trying to pull a list of people based on their last names. The catch is I only want to QUERY people with last names that fit between an alpha range to the 4th character. Example I only want ...
7
votes
2answers
2k views

How to use text from capturing groups in Google Docs regex replace?

I'm trying to match certain text and then replace with the text plus some extra characters. Minimal example text: #10 Oranges. These are citrus fruits Desired output: #10 Oranges. These are citrus ...
1
vote
1answer
336 views

Regular expression in Google Form crashes browser tab

I'm using a free text field in a Google Form. Users should be able to enter the name of a product followed by its price, then start a next line for the next product. To validate their entry I want to ...
1
vote
1answer
410 views

Why doesn't Google give search results for '*' [asterisk]?

You can search for anything on Google, right? At least, so I thought. I was trying to see how the special characters get encoded in the url, like how & gets converted to %26. I started searching ...
-3
votes
1answer
526 views

Use regexmatch to determine if one cell's content contains another's

I want use a cell in regexmatch as regular_expression parameter. My goal is to draw green background for A1 if B1 contains A1 inside of it. How to do this with regexmatch?
4
votes
1answer
2k views

Using regex in Google Sheets data validation

I'm trying to use a regex in the Google Sheets data validation in order to ban the input of special characters, so basically my allowed set should be [a-zA-Z0-9,./()]. I'm using the custom formula ...
3
votes
1answer
986 views

Count Occurence of a Regex Search Term

Using CTRL+F indicates the number of occurrences of a search term. However, when using regex (via Find and Replace) there's no indication of count. Does anyone know how to find the number of ...
3
votes
1answer
293 views

Using regexreplace to surround numbers by parentheses

The data I'm starting with: 1 Hello 2 Just another 22 line 300 Yeah, the first step is to admit you need help I want the "finished" version to look like: (1) Hello (2) Just another (22) ...
6
votes
1answer
3k views

Google spreadsheet query language, match using regex?

I have a query formula that looks into a table and pulls names for example: A B 1 john, andrew blah 2 drew, mike blah I want it to show me all of the rows that ...
1
vote
1answer
139 views

RegexReplace produces an error

I have two sheets of data as per below: ╔═══════════╦══════╦══════════════╗ ║ SheetName ║ Cell ║ CellValue ║ ╠═══════════╬══════╬══════════════╣ ║ Sheet1 ║ B1 ║ ='sheet2'!A2 ║ ║ Sheet2 ║ ...
3
votes
1answer
633 views

How to sort by date with Google Spreadsheet?

Consider the following text in a single column in a spreadsheet: AAPL 2015 Dec 18 C @ 185.000 AAPL 2016 Mar 18 C @ 160.000 ... How to sort by date? I tried extracting the date using regex, but it ...
3
votes
1answer
83 views

Which regular expression flavour is used by the MediaWiki search and replace dialog?

I recently discovered this search and replace dialog in MediaWiki and have been using it more and more: But I can't seem to find the documentation on it. On the MediaWiki website I always find info ...
0
votes
1answer
3k views

RegExp for data validation

I need a help for regexp writing to validate format: any_positive_integer@any_text,any_positive_integer@any_text, ..... To be exact, "any_positive_integer@any_text" separated by commas and inside, ...
8
votes
3answers
5k views

Which formula extracts the domain name from an email address (bob@example.com -> example.com)?

Which Google Spreadsheets formula do I use to get the domain part from an email address? Example: bob@example.com → example.com
11
votes
2answers
7k views

Is there a way to automatically extract information from emails (e.g. regex prices on gmail)?

Every month I get an email from my mobile carrier which tells me how much money my contract has cost me the last month, and I'd like to be able to form that into an iOS notification with IFTTT. The ...
4
votes
1answer
3k views

Case insensitive character string filter for multiple individual columns (dynamic input for each)

I'm looking for an efficient way to filter a data set by multiple individual, case insensitive character strings for multiple columns in a Google docs spreadsheet. I can already achieve this by ...
3
votes
2answers
7k views

Google Spreadsheets Query( “where a matches '/[A-Z+]/' ”) condition

According to Google Query documentation: matches - A (preg) regular expression match. haystack matches needle is true if the regular expression in needle matches haystack. Examples: where ...
1
vote
3answers
2k views

REGEXEXTRACT and French accents in Google Sheets

I have the following formula: =REGEXEXTRACT(source!A2,"^[\w\s\À-ÿ]+") where source!A2="Ancien Marché Saint-Jacques (1125, rue Ontario Est)" and I would like to extract Ancien Marché Saint-...
4
votes
1answer
4k views

How can I search Gmail for a Windows activation key?

Somewhere lost in my Gmail is a Windows key. It's by itself in an email but I cannot find it. It's formatted like so: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX If Gmail supported regular expressions it would be ...
2
votes
3answers
2k views

Finding and removing periods

I'm using a Google Sheets and trying to create a formula to remove a period and anything that comes before it in a cell. For example: idontwantthis.iwantthis I have used this in the past: =(RIGHT(...
8
votes
3answers
728 views

Is it possible to search MediaWiki sites using regular expressions?

I'd like to search for phrases using regular expressions on sites such as Wikipedia and Wikimedia Commons. Is it possible to do this? Example regex search query: (facebook|google) (corporate history|...
58
votes
9answers
79k views

Is there a way to search in Google using regular expressions (regex)?

It would be very useful if Google provided a regular expression search. Is there a way to do this? (OBS: I am not talking about false regular expressions like site:, filetype:, AND, OR or "Text". I ...
2
votes
0answers
865 views

How to write a clean Gmail filter for SVN commits?

I have a dozen or so SVN projects that generate a few dozen email messages every day, each with subject line like this [SVN projectname] in branch/trunk list of files. I want to send these email ...
2
votes
2answers
762 views

Google Search with Regular Expressions [duplicate]

Is it possible to use regular expressions or very simple regular expressions in google search? Like search the term "goog?e", where the ? indicates a character or a number.
3
votes
1answer
121 views

What tools exist that can do string matching (ex. regex) websearches? [closed]

Is there any web search tool that can do the following: Perform a web search where one of the keywords is a string pattern, such as ####suffix, and will match the best result that matches a string ...
3
votes
2answers
5k views

Is there a way to search and replace a regular expression in Google Docs spreadsheets?

The problem is that I entered a lot of formulas like =round(x+y) into a Google Docs spreadsheet. Now I need them exported to MS Excel and the latter only accepts =round(x+y,0) as a valid format. ...
1
vote
0answers
448 views

Search Engine that Doesn't Ignore Punctuation? [duplicate]

Possible Duplicate: How to search the internet for terms with special characters Is there a search engine that will not ignore punctuation marks (like $ % & ! @ #...)? I want to search the ...
14
votes
6answers
3k views

Online regex preview tool [closed]

Is there any good regex webapps out there? I'd like to be able to set which type of regex syntax is used, enter some text and a regex and get matches highlighted. Preferably with different colors so ...