Questions tagged [overlapping-matches]
55 questions
2
votes
1 answer
Overlapping matches with finditer() in Python
I'm using a regex to match Bible verse references in a text. The current regex is
REF_REGEX = re.compile('''
(?q(?:uote)?\s+)? # Match optional 'q' or 'quote' followed by…

raphink
- 3,625
- 1
- 28
- 39
2
votes
1 answer
MySQL Overlapping Date in Group
Sorry if this question is basic, I am learning MySQL.
Let's assume I have one table with names and given dates:
+----+-----------+-----------+
|Name|StartDate |EndDate |
+----+-----------+-----------+
|A |2013-08-29 |2014-12-29 |
|A …

gurluk
- 195
- 2
- 7
2
votes
1 answer
How to render multiple markers at the exact same coordinates in Google Maps API?
I have multiple addresses on the same street with the same house number, but with different apartment numbers. Google Maps Geocoding Service (v2) doesn't go down to apartment level accuracy for many addresses and just returned me the exact same…

johntrepreneur
- 4,514
- 6
- 39
- 52
1
vote
1 answer
If position from File B is found in interval of file A, print to new dataframe
I have two files.
File A with intervals (regions on the genome)
chr startpos endpos nMajor nMinor
1 1 762273 120612006 1 0
2 1 144854594 187610698 2 1
3 1 193051685 249120684 1 1
4 2 45895 242836535…

Justalilibit
- 25
- 4
1
vote
1 answer
How to obtain overlapping values for intervals of dates in R
I have a data frame that looks like this:
w<-read.table(header=TRUE, text="
start.date end.date manager
2006-05-01 2007-04-30 a
2006-09-30 2007-12-31 b
1999-09-30 2007-12-31 c
2008-01-01 2012-04-30 d
2008-01-01 2020-02-28 e
2009-05-01 …

Edoardo Poli
- 15
- 4
1
vote
1 answer
Get all overlapping matches of any length
I'm trying to achieve:
'abc'.scan(regex) #=> ['a', 'b', 'c', 'ab', 'bc', 'abc']
It can be done like this:
(1..'abc'.size).map {|l| 'abc'.scan /(?=(\w{#{l}}))/}.flatten
#=> ["a", "b", "c", "ab", "bc", "abc"]
But I would like to do it in one regex…

Asone Tuhid
- 539
- 4
- 13
1
vote
1 answer
MySQL - How to do a self join to return overlapping date ranges?
I have a table of historical position tenures held by members within an organisation (tbl_tenue).
Each position may only be held by one person at a time but one person may hold several positions sequentially or concurrently.
I want to check the…

user3209752
- 619
- 2
- 17
- 29
1
vote
2 answers
Get common lines, for only specific fields, from multiple files
I am trying to understand the following code used to pull out overlapping lines over multiple files using BASH.
awk 'END {
# the END block is executed after
# all the input has been read
# loop over the rec array
# and build the dup array…

epi_bio
- 95
- 1
- 9
1
vote
3 answers
Match and index all substrings, including overlapping ones
I'm trying to index the matches using the new regex findall, so that overlapped matches can be considered. However, I could only find the matches, but can't correctly give locations for them.
My code:
import regex as re
seq =…

Helene
- 953
- 3
- 12
- 22
1
vote
1 answer
How to use Pandas to keep most recent data from Series with overlapping times
I have multiple pandas series, and they have some overlapping times:
In [1]: import pandas as pd
In [2]: cycle_00z = pd.Series(data=[10, 10, 10, 10],
index=pd.date_range('2015-01-01 00', '2015-01-01 03', freq='H'))
In [3]: cycle_02z =…

rafa
- 235
- 1
- 2
- 10
1
vote
2 answers
Subset only those rows whose intervals does not fall within another data.frame
How can i compare two data frames (test and control) of unequal length, and remove the row from test based on three criteria, i) if the test$chr == control$chr
ii) test$start and test$end lies with in the range of control$start and…

beginner
- 411
- 1
- 5
- 13
1
vote
3 answers
Place text absolutely without overlapping
I need to place text in an array based on the content in the array. For example
$stuff[$i]
";
}
will output…
Neville Aga
- 11
- 1
1
vote
2 answers
How to calculate date range between multiple date that overlaps
i have many dates that i need to check.
For example:
1 - Start: 1387267200, End: 1387274400
2 - Start: 1387270800, End: 1387275000
3 - Start: 1387250200, End: 1387273000
4 - Start: 1387285200, End: 1387288800
What i need is to calculate foreach…

Jayyrus
- 12,961
- 41
- 132
- 214
1
vote
3 answers
Overlapping regex matches
I'm trying to create the following regular expression: return a string between AUG and (UAG or UGA or UAA) from a following RNA string: AGCCAUGUAGCUAACUCAGGUUACAUGGGGAUGACCCCGCGACUUGGAUUAGAGUCUCUUUUGGAAUAAGCCUGAAUGAUCCGAGUAGCAUCUCAG, so that all…

syntagma
- 23,346
- 16
- 78
- 134
1
vote
0 answers
Seeking Overlapping Values between 2 files
I have 2 data sets each containing Start,End,and Chromosome column names. I want to compare the values from the two files and see if there are any regions that dont overlap( taking into account start,end,and chrom positions)and include them on a…

user1454470
- 11
- 1