I am learning regex in php but want to try out how the regex in python works. I have not yet moved to the code side of things and for the same reason, i am searching for the regex examples in both php and python.
To start somewhere, i decided to pick three basic tasks : searching the occurring, split, replace.
So here's my string:
"big brown fox jumps over the lazy dog. fox chases mice, dog chases fox."
(i know it's weird string but have to come up with something for example here).
so for searching the occurrance of word "fox", how should i write the code?
import re
st="big brown fox jumps over the lazy dog. fox chases mice, dog chases fox";
Now here is where i am stuck, which methods are to be used for searching the occurrence and for the split or replace?