Tag: regex
-
Removing extra digits after decimal and leave only two decimal places
your first match will leave the number with max 2 decimal digits. So find with ^(.*?\..?.?).*?$ and replace with \1 Input Output:
-
Extracting names from given list of URLs (using regex)
let us extract name form the URL paste the URL in the notepad and press crtl+f , and select ‘regular expressions ‘ from search mode now, enter the regex in the find tab to fetch names Now, the selected name will be fetched form regex as (\1). it can work on numerous links like:- And…
-
Commonly used regular expressions (regex) for developers in PHP
Commonly used regular expressions (regex) for developers in PHP Regex are used or can be used almost everywhere strings are involved. If you are dealing with text strings, you would often find patterns in them and you might be required to filter few of them based on some similarities and properties. For example: a currency…