Setting up a Destination Goal in Google Analytics using Regex

I want to set up a destination goal in GA to determine when a user reaches the end of a flow, or basically has completed a process.

The problem, the URL changes depending on the activity of the user so we have a URL like this (below) which can vary.

apply/UserAccount?execution=e1s2

The S2 represents the last stage in the flow, which is the page I’m trying to capture. However the e1 could be any number depending on the other activities of the user.

Can someone help with writing a Regex to make sure GA captures the every time a user reaches the last page regardless of the execution number? Is there a way to ignore the “E1” value and simply match the rest? I am completely new to this part so I’d be embarrassed to share what I’ve tried 🙂

regex of three repeating number

I need a regular expression, not one using coding syntax, to write an expression that has a vocabulary of 1,2,3 and every string in the language has at most one occurrence of the substring 222 but never has the occurrence of 123.

((1 or 3)*(211 or 231 or 233 or 2211 or 2231 or 2233))* 222  

is as far as I could get, I can’t see how to prevent 123 from happening while still allowing a string like 1223221222 to occur. Any thoughts?

Can I use REGEX to 301 a URL with extra characters at the end?

I’ve just set up PHPlist to manage my email subscribers.

When folks opt-in, they’re taken to this page:

https://www.example.com/lists/?p=subscribe&id=1

I’d like to redirect them to a custom page here:

https://www.example.com/welcome

I tried to 301 from /lists/?p=subscribe&id=1 to /welcome, but this won’t work. I presume this is because of the characters after /lists/.

And, I can’t 301 from /lists to /welcome because /lists is the first portion of the unsubscribe page as well.

Is there a way I can 301 from the full address above with REGEX? Or is there another way to get folks to a custom page–without editing PHP’s code base?

Thanks!

Finding longest word without help of library functions or regex?

Have the function LongestWord(sen) take the sen parameter being passed and return the largest word in the string. If there are two or more words that are the same length, return the first word from the string with that length. Ignore punctuation and assume sen will not be empty.

**Examples**

Taken from here https://coderbyte.com/information/Longest%20Word

Every single solution that came across in Javascript or C# are the ones which use regex. Is it possible to solve this without regex?

I gave it a shot but could not make it work:

function LongestWord(sen) {   let word = [];   let longestword = "";   let longestwordlen = 0;   let wordlen = 0;   for (let i = 0; i < sen.length - 1; i++) {      if (isAlphabet(sen[i]) && !isInvalidChar(sen[i + 1])) {       wordlen++;       word.push(sen[i]);     }     if (isSpace(sen[i + 1])) {       if (wordlen > longestwordlen) {         longestwordlen = wordlen;         longestword = word.join('')       }       wordlen = 0;       word = [];     }    }    return longestword; }  function isSpace(char) {   if (char.charCodeAt(0) == 32) return true   else return false } function isInvalidChar(char) {   if (!isSpace(char) && !isAlphabet(char)) return true   else return false } function isAlphabet(char) {   if ((char.charCodeAt(0) >= 65 && char.charCodeAt(0) <= 90) || (char.charCodeAt(0) >= 97 && char.charCodeAt(0) <= 122)) return true   else return false }  LongestWord("I am going to kill youeeeeee ") 

Large DFA to regex?

For an assignment for one of my courses, one of the questions is to provide a regular expression for the language:

the set of strings such that the number of 0’s is divisible by six, and the number of 1’s is divisible by five.” over the alphabet {0, 1}.

I made a DFA for this language and it has 30 states. However, going to turn this DFA to a regular expression through state reduction is proving to be very time consuming.

What could be the better or easier way to do create a regular expression that describes that language?

Custom data grabber with regex issue

Hello,

I’m looking to use Scrapebox to scrape all domain name mentions on a list just shy of 4000 web page urls.

The domain names are formatted on the pages like so:

Scrapeboxforum.com
Scrapeboxinfo.net
Scrapeboxhub.org

The domain names are plain text. They are not hyperlinks.

If it helps, they are also always in between <td> and </td> elements.  

I already have my list of almost 4000 urls I want to scan.

I am using 5 private proxies that have been tested and saved.
I think they’re being applied when using the Custom Data Grabber, but honestly I struggle with Scrapebox.

I created inbound and outbound rules for Scrapebox in Windows Firewall.
I can do other things using Scrapebox that do work. Like grabbing internal links on the domain I’m getting the urls from.  

I created a Custom Data Grabber Module and under that a Module Mask:

https://imgur.com/a/TpER4Q3

I tried several regex examples and found this one:

Code:
^(?=.{1,253}\.?$)(?:(?!-|[^.]+_)[A-Za-z0-9-_]{1,63}(?<!-)(?:\.|$)){2,}$

Source: https://stackoverflow.com/a/41193739/5048548

I tested it using the tool on https://regex101.com/ and 3 sample urls come up as matches (as far as I can tell?):

https://imgur.com/iVR422q

However, when I run my Module all I get is this:

https://imgur.com/dGgD3Ft

The Module data folder contains a csv for every time I run the Module, containing two odd characters in the first cell:

https://imgur.com/OS3uupX

I ran several of the urls through browseo.net and the domain names on those urls are readable according to that tool.

Does anyone know where I’m going wrong here?
Or is there a better way to scrape domain name MENTIONS from a list of urls?

Thank you in advance!

Custom data grabber with regex issue

Hello,

I’m looking to use Scrapebox to scrape all domain name mentions on a list just shy of 4000 web page urls.

The domain names are formatted on the pages like so:

Scrapeboxforum.com
Scrapeboxinfo.net
Scrapeboxhub.org

The domain names are plain text. They are not hyperlinks.

If it helps, they are also always in between <td> and </td> elements.  

I already have my list of almost 4000 urls I want to scan.

I am using 5 private proxies that have been tested and saved.
I think they’re being applied when using the Custom Data Grabber, but honestly I struggle with Scrapebox.

I created inbound and outbound rules for Scrapebox in Windows Firewall.
I can do other things using Scrapebox that do work. Like grabbing internal links on the domain I’m getting the urls from.  

I created a Custom Data Grabber Module and under that a Module Mask:

https://imgur.com/a/TpER4Q3

I tried several regex examples and found this one:

Code:
^(?=.{1,253}\.?$)(?:(?!-|[^.]+_)[A-Za-z0-9-_]{1,63}(?<!-)(?:\.|$)){2,}$

Source: https://stackoverflow.com/a/41193739/5048548

I tested it using the tool on https://regex101.com/ and 3 sample urls come up as matches (as far as I can tell?):

https://imgur.com/iVR422q

However, when I run my Module all I get is this:

https://imgur.com/dGgD3Ft

The Module data folder contains a csv for every time I run the Module, containing two odd characters in the first cell:

https://imgur.com/OS3uupX

I ran several of the urls through browseo.net and the domain names on those urls are readable according to that tool.

Does anyone know where I’m going wrong here?
Or is there a better way to scrape domain name MENTIONS from a list of urls?

Thank you in advance!

How to get different html tags from the content using regex?

I am trying to get different html tags from a single post and display them as nested accordion. I have quite accomplished. the only problem I have is that. When I try to show all the p tags content inside span but it shows only the first paragraph for each nested menu content.

Any solution will be most appreciated. Thanks

History 2020 Jan 10 This is first paragraph.

Feb 2 this is second paragraph

Mar 23 this is third paragraph

2019 Jan 20This is fourth paragraph.

Feb 30this is fifth paragraph

Mar 2this is sixth paragraph

‘; $ classesH = 100; for($ w = 1; $ w (.*?)/s’, $ sampleH, $ match); if($ match) { ?> (.*?)/s’, $ sampleH, $ match1); if($ match1) { ?>

(.*?)/s’, $ sampleH, $ match2); if($ match2) { ?>

var acc = document.getElementsByClassName(“accordion”); var i; var abc = document.getElementsByClassName(“accordion1”); var a; for (i = 0; i

Besides regex and serialization, is there or are there any more meta logical-patterns?

I understand that text processing could be done in various ways on top of operating systems:

  • Shell utilities for processing a file (and/or a file name): tr, sed, awk, perl, mv and others

  • text editors for processing a file (and/or or a file name): nano, vim, Emacs and others; whether CLUI/TUI/GUI and whether for “plain” or “rich” text

  • Possible shell builtins: such as compgen to to generate auto-completion matches for specified commands and others

I understand that generally all of these programs can be empowered by meta logical-patterns (and programs) such as regex or serialization (such as JSON key-value pairs).
Besides regex and serialization, is there or are there any more meta logical-patterns?