bug-sed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62328: Not working on ubunto wsl \w, \d, [[:digit:]] not working and


From: Anneliese Leipold
Subject: bug#62328: Not working on ubunto wsl \w, \d, [[:digit:]] not working and [0, 9] only sometimes
Date: Tue, 21 Mar 2023 08:29:09 +0000 (UTC)

Hi,
I have the following installation: windows11 + wsl ubuntu + sed 4.8 
The test-sting is as follows: dataEquity-11521 (128).json

This works, however is not really correct, as I only want to have digits at 
this place   
   - idEquityTemp=$(echo "$FILENAME" | sed -E "s/(dataEquity-)(.{1,12})(( 
\([0,9]{1,3}\))|())(\.json)/\2/g")

These do not work. The result is alway the whole string.:

   
   - idEquityTemp=$(echo "$FILENAME" | sed -E "s/(dataEquity-)(/w{1,12})(( 
\([0,9]{1,3}\))|())(\.json)/\2/g")
   - idEquityTemp=$(echo "$FILENAME" | sed -E 
"s/(dataEquity-)([a-zA-Z0-9]{1,12})(( \([0,9]{1,3}\))|())(\.json)/\2/g")
   - idEquityTemp=$(echo "$FILENAME" | sed -E 
"s/(dataEquity-)([[:digit:]]{1,12})(( \([0,9]{1,3}\))|())(\.json)/\2/g")   


Windows Version
WSL Ubuntu: Version 2.
I reinstalled sed but that didn't help
man sed: Only shows a short version of the manual not this one, so perhaps not 
the correct sed is installed: 
https://www.gnu.org/software/sed/manual/sed.html#Introduction


I am looking forward to your response.Thanks,Anneliese

PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]