HELP!! Regular Expression
-
Greetings!! I need to get some text from paragraphs on html pages and i did the next regular expression: <\s*p[^>]*>(?<1>[\s\S]*)<\s*/\s*p\s*> where <1> is the group in witch i store all text inside a paragraph. It works fine on one paragraph. If i have this sample:
hello 1
hello 2
hello 3
i only get one paragraph that is: hello 1
hello 2
hello 3 What is wrong???? please help me. thanks. Bruno Conde.
-
Greetings!! I need to get some text from paragraphs on html pages and i did the next regular expression: <\s*p[^>]*>(?<1>[\s\S]*)<\s*/\s*p\s*> where <1> is the group in witch i store all text inside a paragraph. It works fine on one paragraph. If i have this sample:
hello 1
hello 2
hello 3
i only get one paragraph that is: hello 1
hello 2
hello 3 What is wrong???? please help me. thanks. Bruno Conde.
-
It's nothing wrong. The pattern you have made is supposed to work that way. Make the pattern that mathes the text non-gready by adding a question mark: [\s\S]*? --- b { font-weight: normal; }
Thank you very much for your reply... It was realy that. ;):-D pharaoh