Search found 3 matches

by BrianR
Fri Jun 24, 2011 3:46 pm
Forum: General
Topic: Retaining capitalization in regex
Replies: 3
Views: 329

As a followup, I'm now suspicious that the culprit is the \L I've been using to reformat the FOOBAR string inside the parentheses, as using your code example it preserves the initial capitals in the expression tagged \2 (in your example), but of course doesn't fix the capitalization of the \1 tag ...
by BrianR
Fri Jun 24, 2011 3:35 pm
Forum: General
Topic: Retaining capitalization in regex
Replies: 3
Views: 329

Sorry, initial attempts were along the lines of

Find:

Code: Select all

<script>document.write\(([A-Z])([A-Z0-9]*)\)</script>([a-zA-Z0-9]*)
Replace:

Code: Select all

<a href="event:\u\1\L\2">\3</a>
Using POSIX syntax, as you noted.
by BrianR
Fri Jun 24, 2011 2:25 pm
Forum: General
Topic: Retaining capitalization in regex
Replies: 3
Views: 329

Retaining capitalization in regex

Hello,
Struggling with this: I need to reformat multiple instances of similar tags, from:

<script>document.write(FOOBAR)</script>foobar
or:
<script>document.write(BARGLE)</script>Bargle

to:

<a href="event:Foobar">foobar</a>
and:
<a href="event:Bargle">Bargle</a>

However I can't seem to get any ...