Jump to content

Archived

This topic is now archived and is closed to further replies.

Eugene

HeLp?

Recommended Posts

Hey all, I need a regular expression, and seeing as my regexbuddy demo expired, anyone have any other regex application?

Also the regex i need is it has to match a specific word.

For example...

preg_match_all('/'.$string.'/', 'whatever', 'whatever', ...);

Instead of matching that particular word, I need it to also match 50 characters after that word. If there aren't 50 character it matches whatever is there.

Thanks.

Share this post


Link to post
Share on other sites
[quote author=ToonMariner link=topic=103505.msg412140#msg412140 date=1155082297]
preg_match_all('/' . $string . '.{0,50}/',......
[/quote]

I'll try that.

Edit: It does work, sorry :$.

Share this post


Link to post
Share on other sites
[quote author=G__F__D link=topic=103505.msg412149#msg412149 date=1155083548]
[quote author=ToonMariner link=topic=103505.msg412140#msg412140 date=1155082297]
preg_match_all('/' . $string . '.{0,50}/',......
[/quote]

I'll try that.

Edit: It does work, sorry :$.
[/quote]How can I also match [i]UP TO[/i] 50 characters before that.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.