Hello people
I have a string which may contain the following HTML attribute:
colspan=”<value>”
for example: colspan=”5″
I need to be able to extract the value of the colspan value if one exists under the following conditions:
1) the colspan phrase is case insensitive
2) the double quote could be single quote or no quotes at all
3) the string may end after the colspan attribute or it may have other attributes (which I don’t care about). If there are other attributes after the colspan, at least one whitespace character can be assumed after the colspan value
The following are some valid examples:
colspan=”5″
colspan=’5′
COLspan=”5″
COLspan=5
colspan=’5′ width=”4″
colSPAN=5 nowrap
I would appreciate it if someone could help me with this as I am new to regular expression
regards