Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 28.07.2004, 08:27   #1
Moderator
 
acid's Avatar
 
Join Date: 09 2001
Location: South Korea, Gumi
Posts: 7,699
Downloads: 102
Uploads: 34
Blog Entries: 16
Reputation: 561 | 6
Default [regexp] Word boundary

How to build the following regexp using PHP preg_match(...) ?

Match all characters beginning from position 0, maximum N characters and aligned to word boundary. So total number of characters will be N + number of characters used to align to word boundary. Text is multiline.
Reply With Quote
Old 28.07.2004, 20:07   #2
Moderator
 
acid's Avatar
 
Join Date: 09 2001
Location: South Korea, Gumi
Posts: 7,699
Downloads: 102
Uploads: 34
Blog Entries: 16
Reputation: 561 | 6
Default

it was
PHP Code:
preg_match("/\A(.{1,150}.*?)\b/s"$fullcontent$smallcontent); 
Reply With Quote
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 13:26.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.