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
789 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
830 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
580 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
586 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
738 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
670 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
690 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
590 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
695 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
821 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
652 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
701 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
386 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
717 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
554 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
536 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
604 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
525 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
789 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
569 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
600 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
752 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
972 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
482 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
568 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
462 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
490 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
535 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

...