Parse RegEx IP matches in Powershell array

I am trying to work out how to parse an array for IP addresses. I have already worked out how to resolve the IP to DNS Hostname so far I have this: Function Get-IP-Hostname { Param([string[]]$array) $array.length foreach ($element in $...
more »

2017-12-01 18:12 (3) Answers

Tie breaker in function "match"

I have a list as follows: rn<-c(10,20,20,10,50,80,100) rn #[1] 10 20 20 10 50 80 100 I have another list say q, which is a sorted version of rn in ascending order. I want to find the index of the numbers in q in my original list rn. So, ...
more »

2017-11-05 19:11 (1) Answers

Match Statement Case Objects in Scala

I'm currently working on a project in Scala and ran into a small issue. I'm currently using a match statement to determine the type of a case object. I'm going through this by saying: abstract class Symbol case object program extends Symbol case ob...
more »

2017-10-01 19:10 (2) Answers

Using match function with colour criteria

I'm trying to find the row of a cell with the usage of match. I've been able to do this with rowfound = Application.WorksheetFunction.Match("123", Range("A:A"), 0) But here come's where i'm stuck at. The "123" may have appeared multiple times in t...
more »

2017-08-30 14:08 (4) Answers

Find Matches in Array

I have array1 = [4, 5, 6, 7, 4, 5]; and array2 = [4, 5]. And I want to match array2 in array1 and to output the number of times it matched. var array1 = [4, 5, 6, 7, 4, 5]; var array2 = [4, 5]; function match(a1, a2) { //matches 4,5 twice bc it...
more »

2017-08-15 20:08 (5) Answers

Get the numbers that are not found in a Column

Good morning, I have two sheets from different sources, both have a matching column but I need to find which values from one sheet are not in the other one, and vice-versa, the results will be listed in two different columns in Sheet Data1. I've made...
more »

2017-07-26 15:07 (0) Answers

Match in lagged group in data.table

I'm trying to create a new column that indicates if an ID was present in a previous group. Here's my data: data <- data.table(ID = c(1:3, c(9,2,3,4),c(5,1)), groups = c(rep(c("a", "b", "c"), c(3, 4,2)))) ID groups 1: 1 ...
more »

2017-06-22 23:06 (2) Answers

Excel 2010 - Find and Add

Current Data I need to find all instances of each value in "Column B" - Product Number and then add each value from "Column C" - QTY to get a total amount of the product number. I want the answer to the function to be placed in "Column I" on the sa...
more »

2017-06-11 23:06 (1) Answers

Data matching in R

I have two dataframes with the same length (1000) and width (200). In both dataframes, each row is a person. In one dataframe, each column is a binary item score (i.e. 0 or 1). In the other dataframe, each column is the item label. Here is it: Dataf...
more »

2017-06-07 18:06 (2) Answers

R - Matching Data Frames

I have the following issue related with matching different data frames. In the first place, I have the next table: table<-data.frame(brand=c('duna','cars','cars','sea','sea','sea','mega','moon','moon'),model=c('mm','mm','mm','ll','ll','ll','tr'...
more »

2017-05-24 22:05 (3) Answers

How to do group matching in R?

Suppose I have the data.frame below where treat == 1 means that the id received treatment and prob is the calculated probability that treat == 1. set.seed(1) df <- data.frame(id = 1:10, treat = sample(0:1, 10, replace = T)) df$prob <- ifelse(d...
more »

2017-04-20 14:04 (4) Answers

No matching %in% when using data.table

Why is it, that the following returns me "TRUE" ifelse(13 %in% 1:13, TRUE, FALSE) [1] TRUE and the following (for me more or less the same) returns "FALSE" TestData <- ifelse(13 %in% TestData[1:13, "V1"], TRUE, FALSE) [1] F...
more »

2017-04-15 18:04 (2) Answers

Excel find, match and mark wildcards

I am trying to do a search based on values that are in column B and find string in column A, example: Column A abc, cde | abc, 1234 | cde | abc, etc Column B abc, cde I am trying to use values that are in column B and search and match in colum...
more »

2017-03-28 08:03 (1) Answers

Match and return list in R

I have data frame with two columns owner and user, both strings, both names. Each row represents a relationship. Owner has posted a question on forum and user has replayed. I need a list of all users when specific user becomes owner. Duplicates are o...
more »

2017-02-21 11:02 (3) Answers

Using regex to get title

I'm not sure how I'd select an title with regex. I've tried match(/<title>(.*) .*<\/title>/)[1] but that doesn't match anything. This is the response body I'm trying to select from. Trying to select "title I need to select." ...
more »

2017-02-01 16:02 (6) Answers