In my several pages I'd like to change all
43th
12th
in UTF-8 code
43&th;
12&th;
how can I do this in sublime text 2 using regex?
Thanks in advance
Luca
To find the element, you can use a regular expression like this:
([0-9][0-9])th
Then replace with:
$1&th;
Related
I, I have this tags:
[URL="http://www.site1.com/hash"][IMG]http://image1.com/image.jpg[/IMG][/URL]
[URL="http://www.site2.com/hash"][IMG]http://image2.com/image2.jpg[/IMG][/URL]
And so on. This for around 70 images and link.
Anyway, I made a mistake in this BB-Style formatting. The forum where I would like to post this message doesn't understand the url code. So I get a result llike this:
[url="http://www.site1.com/hash"]Here appears the image correctly[/url]
So, there is a way in Sublime text for remove all the 70 tags:
[url="http://www.site1.com/hash"] by once, if the url change for every code?
Thank you.
If all you want to do is select [URL="http://www.site1.com/hash"], then do a regex replace with the pattern \[URL=.*?\] and the Replace: field blank.
Once you've done that, do a regex replace with the pattern (\[/IMG\])\[/URL\] and put \1 in the Replace: field.
I create HTML documents from a rst-formated text, with the help of Sphinx. I need to display some Japanese words with furiganas (=small characters above the words), something like that :
I'd like to produce HTML displaying furiganas thanks to the < ruby > tag.
I can't figure out how to get this result. I tried to:
insert raw HTML code with the .. raw:: html directive but it breaks my line into several paragraphs.
use the :superscript: directive but the text in furigana is written beside the text, not above.
use the :role: directive to create a link between the text and a CSS class of my own. But the :role: directive can only be applied to a segment of text, not to TWO segments as required by the furiganas (=text + text above it).
Any idea to help me ?
As long as I know, there's no simple way to get the expected result.
For a specific project, I choosed not to generate the furiganas with the help of Sphinx but to modify the .html files afterwards. See the add_ons/add_furiganas.py script and the result here. Yes, it's a quick-and-dirty trick :(
I want to find and convert to lower case the content of the firth tag p in multiples html files.
This is possible using regular expressions in sublime text? How can I make it?
thanks!
You can try \L in sublime text to convert letters to lower cases:
Find What: (<p.*?>)((.|\n)*?)(</p>)
Replace With: \1\L\2\4
I am trying to find all <br> instances in the following string, but only in the "categories" class:
<td>bla<br>bla</td><td class="categories">cat1<br>cat2<br>cat3</td>
I am realy new to regex, and this is what I tried so far, but it only finds the first <br> after cat1 and takes the whole part in front of it in the result as well...
(?>categories">).*?<br>
EDIT: I want to find all <br> occurences to replace them with a comma. For the moment I'm using a text editor (Sublime Text) to achieve this...
Why would you want to use regex? What are you trying to validate?
http://en.wikipedia.org/wiki/Regular_expression
If you want to find html elements using class variables then you want to look into javascript or jquery
http://api.jquery.com/class-selector/
Hope that helps a bit
Is is possible to have a superscript registered mark "®" inside a select menu? If so, how is this done? Can you use CSS to achieve this?
There's no way to make a single character superscript inside an <option>. You're stuck with a regular ® (®).
You can achieve results in tough cases using this method to superscript special characters with jQuery.
But I must admit that inside an option... I'm blank.
CSS1 : The numbers need tweaking depending on your font and point size.
<div style="font-size:96px;">
Registered<span style="vertical-align:2.7em; font-size:0.2em;">®</span>
</div>
You can use this key shortcut for ®:
Ctrl + Alt + R
I don't know if this is possible with CSS but in html you could write:
Company<sup>®</sup>