Forum Discussion
using wildcards in word
Hi daniils21,
if I understood the question correctly, this is my solution:
FIND: ([0-9]{1;}[.,])(?![0-9]|[a-zA-Z])
REPLACE: \1
This pattern will match numbers followed by a dot or comma, but only if they are not followed by another number or a letter. By using this pattern, the decimal character will only be replaced in numbers that are not immediately followed by another number or letter.
Applying this pattern to your example sentence:
"From the year 2000. until year 2003., was really hot in Latvia. The average temperature was 35.3 degrees."
In this updated sentence, the decimal character in the number "25.3" has been preserved, while the dot after the years "2000." and "2003." remains unchanged, you no longer need to put the word (gads) after the year number.
If my solution helped you, you can click on mark as best response.
Kindest regards
Leon Pavesic
- daniils21Jul 04, 2023Copper ContributorHi, Leon!
unfortunately your expression is not valid:(