Click here to Skip to main content
15,565,474 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
AnswerRe: Regex with condition? Should be easy Pin
Peter_in_278021-Feb-22 13:35
professionalPeter_in_278021-Feb-22 13:35 
QuestionRe: Regex with condition? Should be easy Pin
Richard MacCutchan21-Feb-22 22:10
mveRichard MacCutchan21-Feb-22 22:10 
AnswerRe: Regex with condition? Should be easy Pin
Peter_in_278022-Feb-22 0:03
professionalPeter_in_278022-Feb-22 0:03 
GeneralRe: Regex with condition? Should be easy Pin
Richard MacCutchan23-Feb-22 4:03
mveRichard MacCutchan23-Feb-22 4:03 
GeneralRe: Regex with condition? Should be easy Pin
Peter_in_278023-Feb-22 14:42
professionalPeter_in_278023-Feb-22 14:42 
GeneralRe: Regex with condition? Should be easy Pin
Cp Divers22-Feb-22 5:06
Cp Divers22-Feb-22 5:06 
GeneralRe: Regex with condition? Should be easy Pin
Peter_in_278022-Feb-22 13:40
professionalPeter_in_278022-Feb-22 13:40 
Question06h36m03s to 06h36.1, etc., in filename via regex? Pin
Member 148351468-Feb-22 11:02
Member 148351468-Feb-22 11:02 
Hello, and hoping this isn't too difficult, as I know once we get the regex, these things work beautifully. I'm not even a novice, I can never figure these complex ones out. But here's the deal.

I have a capture program that captures with timestamp and a filename, which is great. Here is the format they come out as, as an example:

2022.01.30.Sun, 06h36m03s- filename 1.png
2022.01.30.Sun, 06h36m10s- filename 2.png
2022.01.30.Sun, 06h36m16s- filename 3.png
2022.01.30.Sun, 06h36m22s- filename 4.png

The change that is needed is for the timestamp portion above, to be changed from this:

06h36m03s
06h36m10s

to this, if under 9 files:

06h36.1
06h36.2

or to this is over 9 files:

06h36.01
06h36.02
06h36.03
06h36.04
06h36.05
06h36.06
06h36.07
06h36.08
06h36.09
06h36.10
06h36.11

So removined the seconds and just putting in a ".1" or ".01", etc., as needed.

I used to just go to my renamer's forum but it's been dead quite a while now. Hoping someone here can kindly help out.

Thank you in advance!
AnswerRe: 06h36m03s to 06h36.1, etc., in filename via regex? Pin
Richard Deeming8-Feb-22 23:12
mveRichard Deeming8-Feb-22 23:12 
GeneralRe: 06h36m03s to 06h36.1, etc., in filename via regex? Pin
Member 148351467-Mar-22 22:52
Member 148351467-Mar-22 22:52 
AnswerRe: 06h36m03s to 06h36.1, etc., in filename via regex? Pin
RedDk8-Mar-22 9:18
RedDk8-Mar-22 9:18 
QuestionUse content of a database field in RegEx Pin
John Bradford 202227-Jan-22 8:31
John Bradford 202227-Jan-22 8:31 
AnswerRe: Matching a unknown range of lines Pin
Pete O'Hanlon18-Jan-22 23:37
mvaPete O'Hanlon18-Jan-22 23:37 
Questionregex related query Pin
Member 154859391-Jan-22 9:23
Member 154859391-Jan-22 9:23 
AnswerRe: regex related query Pin
Gerry Schmitz1-Jan-22 9:45
mveGerry Schmitz1-Jan-22 9:45 
QuestionFind and Replace starting... until Pin
Roland Plomp31-Dec-21 5:11
Roland Plomp31-Dec-21 5:11 
QuestionHow do I make this CASE INSENSATIVE? Pin
RapidDonO23-Dec-21 2:13
RapidDonO23-Dec-21 2:13 
AnswerRe: How do I make this CASE INSENSATIVE? Pin
jschell23-Dec-21 7:09
jschell23-Dec-21 7:09 
QuestionHow to eliminate Pattern if Contains specific words Pin
RapidDonO20-Dec-21 6:30
RapidDonO20-Dec-21 6:30 
AnswerRe: How to eliminate Pattern if Contains specific words Pin
Richard Deeming4-Jan-22 0:32
mveRichard Deeming4-Jan-22 0:32 
QuestionRegular expression to extract row 3 Pin
DanVanClan17-Nov-21 3:53
DanVanClan17-Nov-21 3:53 
Questionfail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 2:07
murdocklawless4-Nov-21 2:07 
AnswerRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
Richard MacCutchan4-Nov-21 3:07
mveRichard MacCutchan4-Nov-21 3:07 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 3:49
murdocklawless4-Nov-21 3:49 
AnswerRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
Peter_in_27804-Nov-21 4:17
professionalPeter_in_27804-Nov-21 4:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.