Oct
25
Python Regex All in One
Hey guys, Hope you all are doing great.
I have always found Regular expressions or REGEX quite amazing. You can solve your string related problem in just some simple magic of patterns.
Our brain works very well to identify the pattern in our day to day life. As these are visual clues, we tend to catch and analyse them better. In fact, their you make negligible mistake to tackle the scenario.
Say you have a pattern with concentric cirles:
Now you see that it has got a pattern in here, the small circle grows by some radius say x and we have another circle and so on...
This can be generalized in mathematical way, as in geometry is:
x2 + y2 + 2gx + 2fy + c' = 0
This same thing applies to string patterns or character arrays.
I have always found Regular expressions or REGEX quite amazing. You can solve your string related problem in just some simple magic of patterns.
Our brain works very well to identify the pattern in our day to day life. As these are visual clues, we tend to catch and analyse them better. In fact, their you make negligible mistake to tackle the scenario.
Say you have a pattern with concentric cirles:
Now you see that it has got a pattern in here, the small circle grows by some radius say x and we have another circle and so on...
This can be generalized in mathematical way, as in geometry is:
x2 + y2 + 2gx + 2fy + c' = 0
This same thing applies to string patterns or character arrays.