Spaces in regular expressions

mi_tsaki

Newcomer
Joined
Jan 14, 2005
Messages
3
undefined
hi! I' m new to regular expressions and i can't make a regular expression that gives me the string <div id=text> because it has a space.. I think.. :o
I would be very happy if you could help me!
 
mi_tsaki said:
undefined
hi! I' m new to regular expressions and i can't make a regular expression that gives me the string <div id=text> because it has a space.. I think.. :o
I would be very happy if you could help me!
You should be able to use a "." (ie. a period) in place of the space. For example, <div.id=text>. The . should match any one character, and a space is considered a character. I believe to match a literal "." you would just escape it like <div\.id=text>.

I'm new to regex also but this should work.
 
spaces in regular expressions

[FOND=Comics Sans MS]xxx[/FOND]
Thank you! :)
I also found another way! You can write div\s*id=text
 
Back
Top