filter? replace? wildcard? reg exp? help please!
Graham Samuel
livfoss at mac.com
Wed May 10 06:57:46 EDT 2017
Totally OT, but is this Dante, in Spanish??
Just askin’. I am not good with languages, as you can probably tell.
Graham
> On 10 May 2017, at 06:33, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> On 5/9/17 11:16 PM, J. Landman Gay via use-livecode wrote:
>> On 5/9/17 10:41 PM, Nicolas Cueto via use-livecode wrote:
>>> Given this snippet...
>>>
>>> -------------------------------------------------------
>>> CANTO XXXIV
>>> CÍRCULO IX: TRAIDORES.
>>> «Vexilla regis prodeunt[307] del Abismo
>>> hacia nosotros[308], mas delante mira
>>> 3—dijo el maestro— y los verás tú mismo.»
>>> -------------------------------------------------------
>>>
>>> ... how do I use LC to remove the square-brackets and any string within
>>> them, so that the snippet becomes...
>>>
>>> -------------------------------------------------------
>>> CANTO XXXIV
>>> CÍRCULO IX: TRAIDORES.
>>> «Vexilla regis prodeunt del Abismo
>>> hacia nosotros, mas delante mira
>>> 3—dijo el maestro— y los verás tú mismo.»
>>> -------------------------------------------------------
>>
>> This is about the only thing I know how to do with regext. :)
>>
>> on fix
>> put fld 1 into tText
>> put "\[.*\]" into tRegEx
>> put replacetext(tText,tRegEx,empty) into fld 2
>> end fix
>>
>
> You'd probably want it to be a function though:
>
> function removeBrackets pString
> return replacetext(pString,"\[.*\]",empty)
> end removeBrackets
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list