/    Sign up×
Community /Pin to ProfileBookmark

hi

i have one mysql table which has 2 fields

1.id 2.message

values

1 r%#dfont style=”font-size: 8pt;”#i#j# WELCOME r%#d/fontb*%d

i want to fetch this data and print it as WELCOME

i want to replace r%#d with ‘<‘ and b*%d with ‘>’ and ignore this #i#j#.
i have used preg_replace but nothing is displaying.any of your help will be appreciated.

thanks
mrjameer

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@bokehJun 07.2007 — What did you try?
Copy linkTweet thisAlerts:
@roshanjameerauthorJun 07.2007 — i tried the following one

$row['message'] = preg_replace( "((http)+(s)?:(//)|(www.))((w|.|-|_)+)(/)?(S+)?i", "r%#da target="_blank" href="http3://5689" title="0"b*%d56r%#d/ab*%d", $row['message']);

thanks

mrjameer
Copy linkTweet thisAlerts:
@bokehJun 07.2007 — Can you explain why you believe this pattern:[QUOTE=roshanjameer]((http)+(s)?:(//)|(www.))((w|.|-|_)+)(/)?(S+)?[/QUOTE]has any relationship with this?r%#dfont style="font-size: 8pt;"#i#j# WELCOME r%#d/fontb*%d[/QUOTE]
×

Success!

Help @roshanjameer spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...