Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regex optional whitespace characters

// Add a s? if a space can be allowed.
// s stands for white space
// ? says the preceding character may occur once or not occur.
// If more than one spaces are allowed and is optional, use s*.
// * says preceding character can occur zero or more times.

'#<a hrefs?="(.*?)" titles?="(.*?)"><img alts?="(.*?)" srcs?="(.*?)"[s*]widths?="150"[s*]heights?="(.*?)"></a>#'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #regex #optional #whitespace #characters
ADD COMMENT
Topic
Name
3+9 =