Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 30 Mar 2017, 16:32
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Geany Replace using Regular Expressions
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
kjdixo

Joined: 13 Sep 2009
Posts: 159

PostPosted: Sat 11 Mar 2017, 06:32    Post subject:  Geany Replace using Regular Expressions
Subject description: This is a starter post to spark interest and elicit further tips
 

Imagine you have a very long list of links.
Within that list are custom tags on every line, maybe 1000 lines.
At the end of every link line, between each of the tags <dd> and <tn> is a two digit decimal number representing thumbnail width.

<dd>76<tn>
<dd>99<tn>
<dd>45<tn>

You originally used bash scripting, or PHP to parse the list and create web pages and thumbnails of the correct width.
You don't want thumbnails anymore and want to convert to a bullet list (as used in wordpress etc)
The end of each link must end in

</a></li>

Geany can do this easily . . . with 'replace' and 'use regular expressions'.

Search for: <dd>[0-9][0-9]<tn>
Replace with: </a></li>

Very basic but might help someone.
Please see screenshot.
reg-expr-geany.jpg
 Description   
 Filesize   30.21 KB
 Viewed   114 Time(s)

reg-expr-geany.jpg

Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 907
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Sat 11 Mar 2017, 16:09    Post subject:  

So ...Whats the problem?
Back to top
View user's profile Send private message Yahoo Messenger 
kjdixo

Joined: 13 Sep 2009
Posts: 159

PostPosted: Sun 12 Mar 2017, 05:53    Post subject:  

@april
That was not a very helpful comment.
You have not read and understood the post properly.

Did I say there was a problem?
Did I ask for guidance or help?

I even provided a subject description to highlight the purpose of the thread.
It is possible you did not read or understand the subject description.
Even without that, it is clear that I am providing a helpful 'howto' for novices.

It should spark interest and elicit further examples.
If it doesn't, I will add more in the future.
Although it is regex it does not really belong in the programming section.
This is more of a cheat sheet of useful tips for Geany Replace - using regex.
So feel free to contribute if you are interested.
Thanks
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0367s ][ Queries: 12 (0.0072s) ][ GZIP on ]