Skip to content

Commit

Permalink
Merge pull request #24 from bryant1410/master
Browse files Browse the repository at this point in the history
Fix broken headings in Markdown files
  • Loading branch information
mihai-vlc committed Apr 16, 2017
2 parents 9ca4421 + bd93edd commit dc8b95f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ test_url = "https://www.google.com"
if tester.match(test_url):
print "Valid URL"

#Print the generated regex
# Print the generated regex
print tester.source() # => ^(http)(s)?(\:\/\/)(www\.)?([^\ ]*)$
```
### Replacing strings
```python
#Create a test string
# Create a test string
replace_me = "Replace bird with a duck"

#Create an expression that looks for the word "bird"
# Create an expression that looks for the word "bird"
expression = VerEx().find('bird')

#Execute the expression in VerEx
# Execute the expression in VerEx
result_VerEx = expression.replace(replace_me, 'duck')
print result_VerEx

#Or we can compile and use the regular expression using re
# Or we can compile and use the regular expression using re
import re
regexp = expression.compile()
result_re = regexp.sub('duck', replace_me)
Expand Down

0 comments on commit dc8b95f

Please sign in to comment.