Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-02-2013, 06:48 PM   #226
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,707
Karma: 75000000
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by mzmm View Post

the '.' and '?' are reserved characters, so to get them to match a literal . or ? you have to escape them with a slash (hence \. and \?).
You actually don't have to quote . and ? within a character class; the only special characters there are ] ^ and \ .
PeterT is offline   Reply With Quote
Old 06-02-2013, 06:51 PM   #227
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
YES!

Quote:
Originally Posted by PeterT View Post
Try
Code:
([a-z])([\.\?\!])([A-Z])
and
\1\2 \3
* I MIGHT have escaped more than I need too... Probably [.?!] would work instead of [\.\?\!]
That works . . . YEAH!

Thanks so much
ReaderRabbit is offline   Reply With Quote
Advert
Old 06-02-2013, 06:58 PM   #228
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by PeterT View Post
You actually don't have to quote . and ? within a character class; the only special characters there are ] ^ and \ .
yeah i was wondering what was going on there.

was actually just on regex.info trying to figure that one out, thanks!
mzmm is offline   Reply With Quote
Old 06-02-2013, 07:06 PM   #229
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,707
Karma: 75000000
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
And I was on http://www.regular-expressions.info/charclass.html
PeterT is offline   Reply With Quote
Old 06-03-2013, 01:24 PM   #230
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Can someone give me the regex for the following to be replaced with nothing, there are several lines with the similar text & numbers layout but different to be replaced

#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/

Cheers
JayLaFunk is offline   Reply With Quote
Advert
Old 06-03-2013, 02:15 PM   #231
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,439
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JayLaFunk View Post
Can someone give me the regex for the following to be replaced with nothing, there are several lines with the similar text & numbers layout but different to be replaced

#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/

Cheers
Did you try selecting the (sample) text: click S&R Icon: Then right-click in the search box: <Tokenize> Warning: be very careful using this in the wild. It is very greedy. I usually restrain it by changing some tockens back to Literals I would step by hand and select Replace/Search until I was really sure
theducks is offline   Reply With Quote
Old 06-03-2013, 02:31 PM   #232
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by theducks View Post
Did you try selecting the (sample) text: click S&R Icon: Then right-click in the search box: <Tokenize> Warning: be very careful using this in the wild. It is very greedy. I usually restrain it by changing some tockens back to Literals I would step by hand and select Replace/Search until I was really sure
Sorry theducks, just realized this is a regex thread for sigil, I am actually trying to get a regex for the above in Notepad++

Thanks
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 02:36 PM   #233
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,439
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Cheat
Paste the sample in Sigil and generate the tokened version
theducks is offline   Reply With Quote
Old 06-03-2013, 02:40 PM   #234
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,439
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Code:
#EXTINF:\d+,.+\s+.+
works NP++ on your sample
theducks is offline   Reply With Quote
Old 06-03-2013, 02:49 PM   #235
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by theducks View Post
Code:
#EXTINF:\d+,.+\s+.+
works NP++ on your sample
That works great but there is some text after the last / that I want to keep

Search
#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/02 Love And Money - Johnny's Not Here.mp3

But keep the last bit
02 Love And Money - Johnny's Not Here.mp3

I thought that there would be some regex that would delete all the text, characters & digits up to the last /

Sorry to all for going off track from sigil
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 02:53 PM   #236
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,439
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
just add a \\ <space> to the end
(escaped \ and a space)
theducks is offline   Reply With Quote
Old 06-03-2013, 03:07 PM   #237
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by theducks View Post
just add a \\ <space> to the end
(escaped \ and a space)
Sorry, not understanding this bit
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 03:24 PM   #238
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by theducks View Post
just add a \\ <space> to the end
(escaped \ and a space)
Using this
#EXTINF:\d+,.+\s+.+\

leaves me the last [word.mp3]
Example
From
#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/02 Love And Money - Johnny's Not Here.mp3

To
Here.mp3
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 05:30 PM   #239
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by JayLaFunk View Post
Using this
#EXTINF:\d+,.+\s+.+\

leaves me the last [word.mp3]
Example
From
#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/02 Love And Money - Johnny's Not Here.mp3

To
Here.mp3
replace the trailing space with a /
mzmm is offline   Reply With Quote
Old 06-03-2013, 05:46 PM   #240
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by mzmm View Post
replace the trailing space with a /
Thanks to theducks & mzmm for your help, that did it

#EXTINF:\d+,.+\s+.+/

Now saved in my regexes

Cheers
JayLaFunk is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Examples of Subgroups emonti8384 Lounge 32 02-26-2011 06:00 PM
Accessories Pen examples Gunnerp245 enTourage Archive 15 02-21-2011 03:23 PM
Stylesheet examples? Skitzman69 Sigil 15 09-24-2010 08:24 PM
Examples kafkaesque1978 iRiver Story 1 07-26-2010 03:49 PM
Looking for examples of typos in eBooks Tonycole General Discussions 1 05-05-2010 04:23 AM


All times are GMT -4. The time now is 08:07 PM.


MobileRead.com is a privately owned, operated and funded community.