you can do in following way:
>>> a = "30.000"
>>> a.replace('.', '')
'30000'
>>> import re
>>> re.sub('\.', '', a)
'30000'
More Related Contents:
- Regex not matching all the paranthesis substrings [duplicate]
- Word boundary with words starting or ending with special characters gives unexpected results
- What exactly is a “raw string regex” and how can you use it?
- Python re.sub with a flag does not replace all occurrences
- Extract float/double value
- Python regex – r prefix
- How to input a regex in string.replace?
- Python Regex Engine – “look-behind requires fixed-width pattern” Error
- regex for Twitter username
- Matching Nested Structures With Regular Expressions in Python
- Python re.sub back reference not back referencing [duplicate]
- How to grab number after word in python
- Extract a string between double quotes
- Reuse part of a Regex pattern
- Find the indexes of all regex matches?
- Python – re.findall returns unwanted result
- Why Does a Repeated Capture Group Return these Strings?
- Splitting out the output of ps using Python
- How to use regex to find all overlapping matches
- How can a recursive regexp be implemented in python?
- Python regular expression pattern * is not working as expected
- Split string at every position where an upper-case word starts
- FutureWarning: The default value of regex will change from True to False in a future version
- Why does this take so long to match? Is it a bug?
- Regex matching – why does this not match and return None?
- How to get the first word in the string
- Python: UserWarning: This pattern has match groups. To actually get the groups, use str.extract
- Generate a String that matches a RegEx in Python [duplicate]
- How to split long regular expression rules to multiple lines in Python
- Python regular expression not matching