EXAMPLE: CODE: 123456 / NUMBER: AA1234567890 I want to extract the CODE with one RegEX and the NUMBER with another. I started with the first one and tried: (?<=CODE:)(.*)(?=/) The idea is to TRIM the matches afterwards, however, the RegEx above does
I created a dataframe df where I have a column with the following values: category 20150115_Holiday_HK_Misc 20150115_Holiday_SG_Misc 20140116_DE_ProductFocus 20140116_UK_ProductFocus I want to create 3 new columns category | A | B | C 20150115_Holida
Considering the data collected with 5 minutes time interval with a numeric variable a,and a discret variable acc, which represents if there's any incident happened(0 for no incident while 1 for incident): a<-c(1:(288*4)) t<-seq(as.POSIXct("2016
I need to use bunch of match case in scala, how do I use for or if inside the match case, so for example: import scala.util.Random val x = Random.nextInt(30) val result = match x { case 0 to 10 => bad case 11 to 20 => average case 20 to 30 => coo
I'm looking to obtain a subset of my first, larger, dataframe 'df1' by selecting rows which contain particular combinations in the first two variables, as specified in a smaller 'df2'. For example: df1 <- data.frame(ID = c("A", "A",
I'm having a problem with getting only the nth match of a pattern. Here is what I'm trying to do: I have the following text and I'm trying to only get the third match: /* Line 1: this is line one Line 2: this could also be line one Line 3: this is th
I have a list of names and I want to look for names containing two given letters asigned using variables. $one = "A"; $two = "O"; Please note that I want those letters to be present anywhere in the checked names, so that I can get outp
I am using INDEX/MATCH to find values in a single column and return the value from a different column using: =INDEX(Sheet1!$A:$A,MATCH(A2,Sheet1!$B:$B,0)) This will search to see if A2 matches a value in Sheet1 column B, and if so will return the val
I have a table with 4 columns and is loaded with data. The data can range from 1000 to maximum of 2Million. I get a file (lets say tab separated) as part of daily process with the data for 4 columns. I should prepare a report where for each column ma
i hope this one isn“t stupid. I have two dataframes with Variables ID and gender/sex. In df1, there are NAs. In df2, the variable is complete. I want to complete the column in df1 with the values from df2. (In df1 the variable is called "gender"
I have a problem. I'm trying to count number of a subtitle lines with php. As you might know, a subtitle looks like this: 1 00:00:00,984 --> 00:00:03,503 All right, guys, let's get to it. 2 00:00:03,587 --> 00:00:04,821 What's that button? 3 00:00:0
I would like to exclude lines containing a string "REVERSE", but my lines do not match exactly with the word, just contain it. My input data frame: Value Name 55 REVERSE223 22 GENJJS 33 REVERSE456 44 GENJKI My expected output: Value Name 22 GENJ
I have put two date time values in cells A1 and B1. The date time is precisely 41703.0416666667. One is ouput from an SQL database the other manually written. The result of =if(A1=B1,1,0) is 1. The result of =MATCH(B1,A1,0) is #N/A. Does anyone have
I am implementing a method which need to find if the string corresponds to some pattern : I am using the following code : if (Regex.IsMatch(str, @"^[\d]{3}00{\d]{4}$")) { return false; } return true; And test it with this string "123003678&
I have a link like this: http://cdn.guerretribale.fr/8.17/19077/graphic/buildings/mid/main2.png?e3ea3 ... or: http://cdn.guerretribale.fr/8.17/19077/graphic/buildings/mid/barracks1.png?691e9 I want to get the building name, in first link is: [...]mid
I would like to split a string contains some numbers and letters. Like this: ABCd Abhe123 123ABCd Abhe ABCd Abhe 123 123 ABCd Abhe I tried this: <?php preg_split('#(?<=\d)(?=[a-z])#i', "ABCd Abhe 123"); ?> But it doesn't work. Only one
I have a file that I want to get a specific date from. There are numerous dates in the file, but the one I am looking for is looks something like this: Blahblah blah blah blahblahblah 07 October 2013 Private & Confidential So I am trying to match a d
I have two files here (file 1 & file 2). I would like to match name in bold as shown below from both files. However I need to print those unmatched data in file 1 format. I have been trying the code below but it is not the result I want. How to print
I have a string like that: 1: Blah blah blah blah 2:blah blah blah blah .... 100: blah blah blah blah I wanna replace it with <span class="meaning">1: Blah blah blah blah</span> <span class="meaning">2: Blah blah blah
I have simple many-to-many relation in table Product_Category (MSSQL 2008 r2): CREATE TABLE #Product_Category (ProductId int, CategoryId int); go INSERT INTO #Product_Category (ProductId, CategoryId) VALUES (1, 200); go INSERT INTO #Product_Category
I use match to split a mathematics expression into separated strings and save them in an array. var STRING = ST.match(/\d*\.\d+|\d+|[()/*+-]/g); but this method separate everything including negative numbers which are inside parentheses. For example
Let us say I have a table users table with a column name and it has the following records: charlie sheen charl een arnold Can I get the records that will match with "charlie sheen" without looping each item? To be more specific: Is there a way t
I need to redirect an old blog URL to a new blog URL. The ID field is the key query string, and everything else in the query string should be ignored. The logic at a high level: If old case insensitive URL matches: /Blog/Post.aspx? + ID=33 anywhere i
Given 2 tables, TableA and TableB, how can I get the "id"s of TableA when the "value" doesn't match with any "value" of TableB? Table A +----+-------+ | id | value | +----+-------+ | 1 | a | | 2 | b | | 3 | c | | 4 | d | | 5
This is my first post on StackOverflow, so apologies if it's lacking the right information. Scenario. I'm in the process of moving away from the Google Weather API to BOM (Australia) weather service. I've managed to get the weather data from BOM just
I want to write an efficient awk script that will take a file similar to the excerpt shown below and print a certain line (for instance, the line beginning with "Time (UTC):") from each matching record. I believe there's a better way than what I
quick question, I have some markdown HTML content that I'd like to convert from double asterisks to bold. the error i'm getting is: `Uncaught TypeError: Cannot call method 'replace' of null ' here's the jsfiddle: http://jsfiddle.net/fz5ZT/9/ here's t
Is MATCH from MySQL also vulnerable to injection attack? For example: """SELECT * FROM myTable WHERE MATCH(myColumnName) AGAINST(%s) ORDER BY id LIMIT 20""" % query seems to allow arbitrary strings, which looks bad. If so, I'
I don't speak English very well. So, if i'll make some mistake please sorry. On the site i have a div box with some information about game: <span class="noteline">Developer:</span> <span class="subline">Gameloft</s
What I need seems simple, but I haven't been able to pull it off so far. Maybe it's just these late hours, or maybe it's not that simple after all, I don't know any more :) So, here's the thing. I want to be able to check whether the search string fr