Search Result

Collapse
17 results in 0.0015 seconds.
Keywords
Members
Tags
regex
  •  

  • Parsing a file, and matching numbers of a sequence (python)

    I currently have a list of genes in a file. Each line has a chromosome with it's information. Such an entry appears as:

    NM_198212 chr7 + **115926679** **115935830** 115927071 11593344 2 *115926679*,'11 5933260', *115927221*,'11 5935830',

    The sequence for the chromosome starts at base **115926679** and continues up to(but not including) base **115935830**

    If we want the spliced sequence, we use...
    See more | Go to post

  • pcamps
    started a topic Matching parts of lines in a file (python)

    Matching parts of lines in a file (python)

    I currently have a list of genes in a file. Each line has a chromosome with it's information. Such an entry appears as:

    NM_198212 chr7 + 115926679 115935830 115927071 11593344 2 115926679,'115933260', 115927221,'115935830',

    The sequence for the chromosome starts at base 115926679 and continues up to(but not including) base 115935830

    If we want the spliced sequence, we use the exons.The first extends from 11...
    See more | Go to post

  • starlight849
    started a topic RegEx Question

    RegEx Question

    Looking for the best way to parse a phone number (in a 3-3-4 format) from a string..
    The string may contain a lot of junk information on the line.
    If there is a code following the phone number then I also want to pick that up.


    Code:
    For example 
    String1 = "This is string 1 and here is my phone number 123-456-7890"
    
    String2 = "String 2 is 123-456-7890USA"
    ...
    See more | Go to post

  • user1980
    started a topic Regex.match returns null

    Regex.match returns null

    hi there

    it seems to be simple but i do not know why my java script function does not work.
    Code:
    function validatePartialDateInput(SourceField, FieldLabel) {
       
            var sField = document.getElementById('ctl00_ContentPlaceHolder1_'+ SourceField);
                 
            var regex_dt = '/^\d{1,2}[/]\d{4}$/';
            alert((sField.value));
            alert(regex_dt.match(sField.value));//returns
    ...
    See more | Go to post

  • user1980
    started a topic Regex.Replace not working as required.
    in .NET

    Regex.Replace not working as required.

    Hi there,



    I am trying to replace text in my xsl file. I have to replace all the http and https. But I can leave any links that start with <a href>

    Ie; http://www.google.com has to replaced. But < a href=”google.co m”>google.com</a> has to remain as it is.



    I am using regex to find all the http(s) and a hrefs in the text. I am struck here.
    ...
    See more | Go to post

  • svendok
    started a topic Regex for matching over 2 lines
    in Perl

    Regex for matching over 2 lines

    Hi,
    I have thousands of lines of code like this:
    Code:
    Blah1 blah1 blah1 = A1;
    Yada1 yada1 yada1 = B1;
    Blah2 blah2 blah2 = A2;
    Yada2 yada2 yada2 = B2;
    I want to swap the A value with the B value.

    What is the syntax for a Perl regex that would do this? I'm struggling with the line break.

    Thanks in advance.

    svend
    See more | Go to post

  • akselo
    started a topic Regex for replacing missing value period

    Regex for replacing missing value period

    I am parsing a csv data file with comma as the delimiter. The file mostly contains integers but also some decimal numbers/floats.

    It has some missing values, which are marked by a period ("."). In order to insert into a database, I want to replace the missing value periods, but NOT the decimal periods.

    With python's regex flavor and the re.sub construct applied to each line read as a string, can someone help what...
    See more | Go to post
    Last edited by akselo; Dec 20 '10, 06:55 PM. Reason: correction

  • msjonathan
    started a topic Regex for retrieving date format

    Regex for retrieving date format

    hej hej,

    I can't succeed to produce a piece of code that does the following: If I have a string with a file name =>
    Code:
    nameOfFile{yyyy/mm/dd}.txt it becomes nameOfFile2010/06/28.txt
    It should be also possible for multiple dates
    Code:
    nameOfFile{yyyy/mm/dd}inMonth{mm/yyyy/dd}
    I tried to write a regex expression to retrieve the format from filename.
    Code:
    string[] dateFormats = Regex.Split(fileName, @"(\{.\})*");
    ...
    See more | Go to post

  • sakshismriti
    started a topic Regular expression in Perl
    in Perl

    Regular expression in Perl

    I have a regex which extratcs the name from it.

    The code is given below:
    Code:
    # Extract some parts from regex
    $input = "Hello, Shane !";
    $pattern = "^Hello, \\w+\\s*!\$";
     
    if($input =~ /$pattern/) {
    	print "\nThe input matches the pattern The dollar variables are\n";  
    	print " \nONE == $1";
    	print "\n";
    }
    
    The input
    ...
    See more | Go to post
    Last edited by sakshismriti; May 27 '10, 09:18 AM. Reason: change in code

  • vavc1980
    started a topic Replace all special characters except asterisk

    Replace all special characters except asterisk

    Hello,

    I've been trying to find a way using regex to replace all special characters and spaces in a string but leaving the asterisk there.
    Example:
    (8.88)***1 234--

    result should be:
    888***1234

    I've been looking on the web (still am) and also trying myself but I just can't find it, what I have removes the asterisk too, which I don't want. Here's what i have (by the way this is...
    See more | Go to post

  • tfpx
    started a topic regex, does not contain

    regex, does not contain

    Hi Experts,

    Wasn't sure where to put this so I followed the posting rules. I'm looking for a regex that gives me the following results:

    Example 1:
    string = "randomtextrand omtexttotal15.1 9randomtextrand omtext"
    needed result: "total15.19 "

    (I managed to do this pretty well, now the one that gives me a problem:)

    Example 2:
    string = "randomtextrand textsubtotal15. 19randomtextran domtext"...
    See more | Go to post

  • Using RegEx in extracting Data in a File

    Hello,

    i've tried to extract certain data using Regex in a File. but it seems not working.No errors and warnings have been found.

    here is my code:
    Code:
    Private Sub extractTxt(ByVal inputFile As String)
            ' this  will extract specific text from a 
            ' file using Regular Expressions class in .net
            Dim DateRegEx As Regex
            Dim m As Match
            Dim i As Integer
    ...
    See more | Go to post
    Last edited by PRR; Apr 13 '09, 12:46 PM. Reason: Please post code in [code] [/code] tags.

  • how to separate string within the specified tag in c#

    i want to separate string within the specified tag.
    eg.,
    <strong>some string here</strong>


    result should be:"some string here"

    pl help me.
    See more | Go to post

  • faelnefal
    started a topic get sentences in paragraphs REGEX

    get sentences in paragraphs REGEX

    i need to regex to get all the sentences within a paragraph... how will i do that?
    tnx in advance
    See more | Go to post

  • Xx r3negade
    started a topic quick regex question

    quick regex question

    Hi, I am very bad with regexes.
    I need a regular expression that will reduce a url like this:

    hxxp://example.com/somefolder/something/whatever

    to its base:

    hxxp://example.com

    The two slashes after the http: complicate things. I know I could just remove the "http://" and add it again later, but as a learning experience, I would like to do this regex in a single line....
    See more | Go to post
Working...