User Profile

Collapse

Profile Sidebar

Collapse
Iasthaai
Iasthaai
Last Activity: Feb 27 '07, 07:25 AM
Joined: Feb 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Iasthaai
    replied to Regular Expression Blues
    Hey everyone! Thanks for all the responses, they were all very helpful. It turns out that I solved this one shortly after posting (that always happens to me!) and I did use a regular expression, mostly the same as my first one (it turns out that the + flag on the first [A-Z] was unnecessary for my purposes):

    Code:
    import re
    regword = re.compile("[A-Z](\S*[A-Z]+)*", re.I)
    It turns out that the...
    See more | Go to post

    Leave a comment:


  • Iasthaai
    started a topic Regular Expression Blues

    Regular Expression Blues

    Hello everyone, I'm new to Python and also new to this forum and I have a question regarding regular expressions, so here goes:

    I am attempting to read in a text and do some pattern matching before I store words in a dictionary. I basically want to read in the words and remove any numbers, punctuation, or other special characters from the beginning and end of the word. However, I do wish to keep all of the above in the word if the...
    See more | Go to post
No activity results to display
Show More
Working...