How to check the coincidence at the end of the line?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
49 views
Tell me how to check whether the entry in the last row and does not have any after the characters?

For example I'm looking for the word car in a sentence This is a car and it should return true, but This is a car or something else it should return false because then there is the text.
by | 49 views

1 Answer

0 like 0 dislike
Elementary a: /(car)$/ -when after nothing no symbols, spaces, line break.
With a line break, but without tabs, spaces: /(car)(?=$|\)/
MB I something not so understood the task.
by

Related questions

110,608 questions
257,186 answers
0 comments
35,647 users