Skip to content
Advertisement

Tag: javascript

regular expressions – same for all languages?

is the regexp the same between languages? for example. if i want to use it in javascript, would i have to search for regexp for javascript specifically. cause i got some cheat sheets. it just says regular expression. i wonder if i could use this on all languages, php, javascript and so on. Answer The basics are mostly the same

How to add anchor tag to a URL from text input

I want to be able to take user inputted text in a comment field and check for URL type expression, and if it exists, add an anchor tag (to url) when the comment is displayed. I am using PHP on the server-side, and Javascript (with jQuery) on client, so should I wait to check for URL until right before it

Can’t add new lines in JavaScript alert Box?

I’m generating a string in PHP and then eventually passing this string into a JavaScript alert box, my problem is I actually can’t add line breaks in my alert box. My code looks as follows I’m getting the error: Undeterminnated string literal If I remove the n from the string it works 100% but without line breaks. Answer This happens

Advertisement