ok i have some string
'Hello^<php>World&*124><
i ju*st press enteR'
how do i return it to ( a function is better ? )
'Hello World123
i just press enter'
allow
- numbers
- text
- spaces , newline , etc
how do i do that with a regex? do i have to use regex? is there a another way ?
Thanks
Adam Ramadhan
You can do this:
This will remove anything other than alphabet, numbers, space and newline
If you also want to remove any tags such as
<php>in your text, you could do:Usage:
Result:
.
Result: