Jump to content

joshis

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

joshis's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello, I have a simple htaccess issue. In my localhost I have a folder mysite. mysite has three subfolders. 1. html 2. dev 3. images I have put my htaccess in mysite folder. My rule is if anyone access site through http://localhost/mysite it should read files from html folder. My current htaccess is follows RewriteBase / RewriteEngine on RewriteCond $1 !^(index\.php|images|css|dev|js|robots\.txt) RewriteRule ^(.*)$ html/index.html$1 [L] -Arun That is http://localhost/mysite/aboutus.html should show files in http://localhost/mysite/html/aboutus.html -Arun
  2. Hi, I have a html string. In that I defined some area for editing. That area enclosed in certain comment. I want to get all the content between that comment. For example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>My title</title> <!--text--> </head> <body> <!--start editable content--> <div class="container1"> some html with <b>bold</b> string </div><!--End Container--> <!--end editable content--> </body> </html> In the above example I need <div class="container1"> some html with <b>bold</b> string </div><!--End Container--> -Thanks Arun
  3. Wow, Its worked. 1000000000 Thanks Jay... -Arun
  4. Hellom I have a text string. That may or maynot contain email addresses. I want to replace all . (fullstop) to dot. I mean to Can I do with regex rules? -Thanks
  5. Hi, I need some help about .htaccess file. I want to redirect http://www.yourdomain.com to http://yourdomain.com. how to do this? I have a code, can anyone correct it? RewriteEngine On RewriteCond $1 !^(index\.php|images|css|js|uploads|ckeditor|photos|albums|books|robots\.txt) RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$ [NC] RewriteRule (.*) http://yourdomain.com/$1 [R=301,L] I am developing the site using codeigniter Thanks Arun
  6. Need Regular Expression help Hi, I want to remove all string stating with "<p class='fb-like'><iframe" and ending with "</iframe></p>" from a long html string. It may contain more than one such expressions. Any help is greatly appretiated. Thanks Arun
  7. Thanks for your help. I have small tweek as you mensioned on last post, Itried last one but it doesn't work for me. For every link text it appends three dots (...) regardless of the total no of chars. For example <a href="http://site.com">site</a> it returns a href="http://site.com">site...</a> it should be <a href="http://site.com">site</a> Only for link texts with length more than 30 i require ... Any help is greatly appreatiated.
  8. Thanks Crayon Violent, Its working fine.
  9. I have a html string that contain 'many' links like I want this link to be replaced with that is link text is shrink to limited no (30) chars. I am not good at regx. Can any one please help?
  10. I would like to get strings within the '{}' symbols. My expression is like this. but it gives result as but I need Can anyone help me?
  11. I used your code like this.. <? $input = <<<END some content <img src="image1.jpg" alt="" width="100" height="150" /> some content. <div><img src="image2.jpg" alt="" width="100" height="150" /></div> some content <img src="image3.jpg" alt="" width="100" height="150" /> some content..<div><a href="#"><img src="image4.jpg" alt="" width="100" height="150" /></a></div> some content END; //preg_match_all("#<img[^>]>#i", $input, $out); preg_match_all("#<img[^>]*>#i", $input, $out); var_dump($out); ?> Sorry If am wrong. It finds all the images...
  12. My actual requirement is, My html contains many img tags. Some are inline and some are enclosed in a div or anchor tag. So my inline images are scattered in the page regardless of the style and size. So I would like to enclose these tags in a <div><a> wrap to style it. Thats why I need this pattern.
  13. sorry cags, it is not working...
  14. I have some html content. I would like to find all the 'inline' images in the content. I dont need to find the images with in any other tags like anchor or div. eg: some content <img src="image1.jpg" alt="" width="100" height="150" /> some content. <div><img src="image2.jpg" alt="" width="100" height="150" /></div> some content <img src="image3.jpg" alt="" width="100" height="150" /> some content..<div><a href="#"><img src="image4.jpg" alt="" width="100" height="150" /></a></div> some content I want to find img tags <img src="image1.jpg" alt="" width="100" height="150" /> and <img src="image3.jpg" alt="" width="100" height="150" /> because they have no outer tags.
  15. Thaks Daniel. It works....
×
×
  • Create New...

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.