I won't list the concerns that the chatGPT has raised among the average Internet user - there are tons of them, you can read for yourself.
But here I gave him an assignment: "Can you suggest a regular expression in PHP that would remove all attributes of all tags except src in the text?"...
After each answer he gave, the standard task clarification began:
- only the SRC attribute should be left, the rest should be removed
- the content of the SRC attribute should remain as well
- this code doesn't work, check yourself
- in this version the code does not work, because all attributes except style|class|alt remain
And so on.
After playing with it for about 10 minutes, I quickly found a solution here https://stackoverflow.com/questions/33093509/php-regex-remove-all-attibute-except-href-in-html and it is very correct at least from the position that it allows you to easily replace href with src, add a couple of attributes - that is, it gives a flexible, customizable solution. Chat could not give me such a result.
Hence two conclusions:
- At this stage, it is not worth being afraid of it - the revolution of cars is still postponed :)
- To use it, you need to be able to do what you are asking it to help you with!
And the second conclusion makes you wonder: what is the purpose of a chatGPT? The answer is simple - as a generator of ideas and directions for finding an answer! This is where it is great, as it gives us a squeeze of the entire Internet, saving us hours of searching and processing garbage!
Top comments (0)