+ 2
Is it possible to delete a character in a paragraph by unicode value?
For example I mean <html> <head> </head> <body> <p>Hello World!</p> </body> And for example, the unicode value for 'o' is 0040F so it's going to delete all the 'o'-s and outputs 'Hell Wrld'
5 ответов
+ 8
If the unicode is U+100F0, it will be .replace(/[\u100f0-\u102f4]/g, ""). Tell me if it works, I kind of forgot the syntax.
+ 5
Lmao, if you want to delete the letter 'o', just use JS RegExp...
document.getElementsByTagName("p")[0].innerText = document.getElementsByTagName("p")[0].innerText.replace(/o/g, "")
// replacing all 'o's to blank characters
+ 1
I got it but the problem is there are lotsa characters in the unicode and I would mean it to work like replace e.g 100F0-102F4 to ""
0
lets see i want then i can use the javascript dom functions.mbut if i am a noob amd do not have any idea about a dom function then i can maybe also use a loop for this case. like i can check all the characters one by one and see if they are == "o" if yes then replace that with a blank space
- 5
gahsyyegr3bd .hsywbsgsjdu63nevdhs :#^#^#₩72&#^ ●$\>_¡{\{●》◇○€$ zhehsiu3hr