Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged regex

0 votes
752 views
1 answer
    New to R. Looking to replace the entire string if there is a partial match. d = c("SDS0G2 Blue", " ... in solving this is truly appreciated. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
803 views
1 answer
    I have the code: import re sequence="aabbaa" rexp=re.compile("(aa|bb)+") rexp.findall(sequence) This returns ['aa'] ... 'aa','bb','aa']? Thanks! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
564 views
1 answer
    I need help coming up with a regex to make sure the user enters a valid date The string will be in the format ... The day should not go over 31. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
572 views
1 answer
    I want to grab an img tag from text returned from JSON data like that. I want to grab this from a string: <img class="img ... [^'"]+)['"][^>]*>" See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
700 views
1 answer
    I have a table CANDIDATE in my db which is running under MySQL 5.5 and I am trying to get rows from ... CANDIDATE c WHERE firstname LIKE'%ram%'; See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
644 views
1 answer
    I'm trying to find a regex for removing everything after the last dot in a file. So far I've found ways to ... me on the way? Thanks in advance See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
664 views
1 answer
    I think I created a working regular expression for what I need. Just wondering if anyone can break it or ... must be INSIDE the parenthesis. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
561 views
1 answer
    my file contains lines such as these: -A INPUT -m state --state NEW -m tcp -p tcp --dport 2000 -j ... the most practical method ? ( fastest ) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
665 views
1 answer
    I am wondering if there is a simple snippet which converts links of any kind: http://www.cnn.com to <a href=" ... works but a.cb does not work. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
801 views
1 answer
    I have a string like following var str="A,B,C,E,'F,G,bb',H,'I9,I8',J,K" I'd like to split the string on commas. ... A B C E F,G,bb H I9,I8 J K See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
634 views
1 answer
    Is there a way to obtain patterns in one file (a list of patterns) from another file using ack as the - ... efficient way to complete? Thanks! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
674 views
1 answer
    I would like to flatten lists extracted from HTML tables. A minimal working example is presented below. The example ... 2003", and "1996". See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
370 views
1 answer
    What follows is a perl function I wrote years ago. It is a smart tokenizer that recognizes some instances of ... return matcher.findall( s ) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
684 views
1 answer
    I'm trying to find all occurrences of a substring in a string in Java. For example: searching "ababsdfasdfhelloasdf" ... I achieve this in Java? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
538 views
1 answer
    I want to match strings like: The sentence is 'He said "Hello there"' The sentence is "He said 'Hello ... solve my (seemingly simple) problem. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
517 views
1 answer
    I have a text file in the following format: DELIMITER1 extract me extract me extract me DELIMITER2 I'd like ... line_iterator.next() Any ideas? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
569 views
1 answer
    I am looking for a regular expression to match the following -100..100:0.01. The meaning of this expression is that ... -100 to 100. Any help ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
500 views
1 answer
    I have a C file which I copied from somewhere else, but it has a lot of comments like below: int matrix[20]; ... using one of sed, awk or perl. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
755 views
1 answer
    I have tried to restrict users in HTML text box to insert only 4 digit numbers 0-9. I have tried as follows but it ... 1-9]|[1-9]d$" required/> See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
547 views
1 answer
    I need to extract the src element from all image tags in an HTML document. So, the input is an HTML page and ... a faster way to get an answer. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
574 views
1 answer
    I would like somebody to help me with an if-else statement in htaccess. What I want is htaccess to read a ... /rewrite_rule or deny from all. } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
724 views
1 answer
    I'm trying to limit the entries to a specific format. If the entry has 5500 or 5100 such as 011-5500-000- ... with the if then else idea? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
943 views
1 answer
    Does anyone know of a regular expression for matching on a sequence of four digits? I need a match on ... descending; 1357 shouldn't match. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
466 views
1 answer
    I am trying to split a string by a single or multiple occurrence of letters. For example: aaabbcapppp, would ... a much more efficient solution. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
548 views
1 answer
    I have the following sequence occurring multiple times in a file: yyyy xxxx zzzz I have a regex that matches xxxx. ... I use sed to do this? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
444 views
1 answer
    Given a list ["one", "two", "three"], how to determine if each word exist in a specified string? The ... . Maybe I should ask another question. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
469 views
1 answer
    How can I remove the letters between two specific patterns in R? For instance a= "a#g abcdefgtdkfef_jpg>pple" I ... in stringr but I couldn't See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
510 views
1 answer
    Have: f = open(...) r = re.compile(...) Need: Find the position (start and end) of a first matching regexp ... File 'f' is expected to be big. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...