![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a string like A:BCD:EFG and I need to populate a variable with 'BCD'. What is the RegEx syntax for matching the content between the two colons? |
.*):.*/, "$1")
.*):/)[1]
#3
| |||
| |||
|
RegEx noob here, so apologies for such an easy issue. ![]() I have a string like A:BCD:EFG and I need to populate a variable with 'BCD'. What is the RegEx syntax for matching the content between the two colons? |
#4
| |||
| |||
|
|
neptune6jun44 (AT) gmail (DOT) com wrote: RegEx noob here, so apologies for such an easy issue. ![]() I have a string like A:BCD:EFG and I need to populate a variable with 'BCD'. What is the RegEx syntax for matching the content between the two colons? Assuming "BCD" is variant, for example :[^:]+: (a colon followed by a positive number of non-colons followed by a colon.) How to write Regular Expressions in general is off-topic here as those can be employed in many programming languages. |
#5
| |||
| |||
|
RegEx noob here, so apologies for such an easy issue. ![]() I have a string like A:BCD:EFG and I need to populate a variable with 'BCD'. What is the RegEx syntax for matching the content between the two colons? |
#6
| |||
| |||
|
|
I have a string like A:BCD:EFG and I need to populate a variable with 'BCD'. |
.*):
#7
| |||
| |||
|
|
Thomas 'PointedEars' Lahn said the following on 12/12/2007 6:18 PM: How to write Regular Expressions in general is off-topic here as those can ^^^^^^^^^^ be employed in many programming languages. Writing Regular Expressions for Javascript/JScript is *very* on-topic in this group. And to say otherwise is ignorant |
#8
| |||
| |||
|
|
I have a string like A:BCD:EFG and I need to populate a variable with 'BCD'. this works for me: .*): |
|
but I have little or no concept of putting things in variables. I use "The Regex Coach" to ensure that things work as I would expect them to. |
#9
| |||
| |||
|
|
On 13 Dez., 03:24, Randy Webb <HikksNotAtH... (AT) aol (DOT) com> wrote: Thomas 'PointedEars' Lahn said the following on 12/12/2007 6:18 PM: How to write Regular Expressions in general is off-topic here as those can ^^^^^^^^^^ be employed in many programming languages. Writing Regular Expressions for Javascript/JScript is *very* on-topic in this group. And to say otherwise is ignorant |
#10
| |||
| |||
|
|
This will match also `::'. |
|
Is that a book? |
![]() |
| Thread Tools | |
| Display Modes | |
| |