Search Result

Collapse
12 results in 0.0025 seconds.
Keywords
Members
Tags
regular expression
  •  

  • Python - To find region between start.start and end.start

    for my code

    Code:
    for orf in [mydna[start.start():end.start()+3] for start in re.finditer('(?=ATG)',mydna
               for end in re.finditer('(?=TAA|TAG|TGA)',mydna if end.start()>start.start() and (end.end()-start.start())%3 == 0]:
            #print orf
    How to make the program stop at the first end regions .
    See more | Go to post

  • Extracting URL from a link containing a specific string

    I'd like to get address of certain links with desired text. Let's say I want to get links containing a word "BMW".

    Code:
    <a href="http://abc.com/xxxx">Dodge</a>
    <a href="http://abc.com/a123.php">Used [B]BMW[/B] card</a>
    <a href="http://xyz.com/ferrari">Brand new Ferraris</a>
    <a href="http://xyz.com/vjklj"><img src="pic.jpg"
    ...
    See more | Go to post

  • abhishek1234321
    started a topic Select Tables using Wild Cards?

    Select Tables using Wild Cards?

    I there any way to select tables using wildcards?
    like for example i have 100 tables in my database with names "1rn08cs001 " "1rn08cs002 "... etc

    now i want a wild card method to select oly the tables from
    1rn08cs001 to 1rn08cs005

    is this the right way
    Code:
    mysql_query("SELECT * FROM REGXP 'some regular expression'"
    See more | Go to post

  • Simple regular expression replace for picture URL

    I need to replace picture links inside strings like this example :

    blabla http://img146.imagesha ck.us/img126/6348/anything.jpg blabla
    for
    blabla [img:http://img146.imagesha ck.us/img126/6348/anything.jpg] blabla

    I can found them with this regex without problems : ((http(s?):)|([/|.|\w|\s])*\.(?:jpg|gif| png)

    My actual replace is : [img:$&]

    I didn't find a way to put my last...
    See more | Go to post

  • snookie5000
    started a topic Problems searching/finding long strings

    Problems searching/finding long strings

    I'm using Access 2007 and I have a table with a couple of regular expressions. I need to search this table to find if a newly created regular expression already exists in this table.

    For short regular expressions, the SQL query I wrote can find them, but for really long regular expressions the query doesn't seem to recognize them. When I go into the table and copy the long regular expression and then click ctrl+F, even this cannot...
    See more | Go to post

  • DjPal
    started a topic parse log file to obtain IP's with failed attempts

    parse log file to obtain IP's with failed attempts

    I am trying to parse through a log file to obtain the IP addresses with >5 failed
    login attempts, firstly I'm trying to get the IP addresses but there seems to be something wrong with the regular expression I think. would be good to export the addresses to another text file, does anyone have any ideas where to go from here?

    Thank you.


    [code=python]

    #!/usr/local/bin/python
    file = open(location)...
    See more | Go to post
    Last edited by bvdet; Feb 28 '10, 07:19 PM. Reason: Fix code tags

  • firstposter
    started a topic php regex for nickname input
    in PHP

    php regex for nickname input

    Hello can someone please help improve the regex I have:

    /^[^\s].*[^\s]$/

    It's intended to be used for a nickname field with the following criteria:

    > no spaces

    > exclude the following words(substring ) within the nickname: 'anonymous', 'xxx', 'yyy'

    > just allow letters, numbers, hyphens and underscores eg. exclude characters such as @, #, !, ~, %, ^, *, (, ), =,...
    See more | Go to post

  • dibyenduchatterjee
    started a topic Issue with special characters in Perl
    in Perl

    Issue with special characters in Perl

    I am getting some special characters in my browser displayed weirdly, while getting them from from the BLOB of a DB table.

    Here it is :
    " My name is �Dibyendu Chatterjee�.... ."

    I want all special characters pulled from the BLOB as it is through perl.

    Please help...
    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

  • moazam
    started a topic PHP Regular Expression
    in PHP

    PHP Regular Expression

    Hello,
    I have clickable url function which convert text into clickable urls. All works fine except it fails in one condition. Here is the code

    Code:
    function make_clickable_urls($text) {
      $text = preg_replace("/(?<!<a href=\")((http|ftp)+(s)?:\/\/[^<>\s]+)/i", "<a href=\"\\0\" target=\"_blank\">\\0</a>", $text );
      $text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)',
    ...
    See more | Go to post

  • at lest 2 character in that and a maximum of 3 characters.

    I am creating a 6 character alpha numeric sting dynamically

    i just want to esure that there is at lest 2 character in that and a maximum of 3 characters.
    others will be automatically digits (3-4)

    I made a regular expression ie like


    ^([a-zA-Z]{2,3}[0-9]{3,4})|([0-9]{3,4}[a-zA-Z]{2,3}?)$

    but is not matching for 22XX22
    here i have 4 digits and 2 letters it must be matching...
    See more | Go to post

  • pranaysharmadelhi
    started a topic Help generating Regular Expression

    Help generating Regular Expression

    I want to generate a regular expression for password check.(ASP.Net)
    But javascript is what it really is.
    I would like to enforce Minimum 6 alphanumeric characters with minimum 1 numeric(0-9) and 1 character(a-z) or 1 Special Character(. or _)
    So far I have been able to generate something so they enter 6 alpha numberic characters, but don't know a way to check presence of 1 numeric and 1 alpha-numeric characted(or special)....
    See more | Go to post
Working...