Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

sed BBCode

Name: Anonymous 2009-10-15 7:15

I want to remove all BBCode tags.

> echo "expert:[b][i][o][aa][u]EXPERT BBCODE[/u][/aa][/o][/i][/b]" | sed -e 's/\[\/?[^\]]*\]//g'
expert:[b][i][o][aa][u]EXPERT BBCODE[/u][/aa][/o][/i][/b]



Why doesn't this work?

Name: Anonymous 2009-10-15 7:17

Are you serious?

Name: Anonymous 2009-10-15 7:24

works fine in perl
$_ = "expert:[b][i][o][aa][u]EXPERT BBCODE[/u][/aa][/o][/i][/b]";
s/\[\/?[^\]]*\]//g;
print $_, "\n";

outputs:
expert:EXPERT BBCODE

Name: 3 2009-10-15 7:30

also, the \/? part appears to be completely redundant.
s/\[[^\]]*\]//g; should produce the same output.

Name: Anonymous 2009-10-15 7:36

>>4
Yes. Yes, it should, and that's what I have been using for the most part, and I don't know why I added it.

Name: Anonymous 2009-10-15 11:10

>>1
I want to remove all BBCode tags.
You monster!

Name: Anonymous 2009-10-15 11:21

>>1
BREAKING NEWS, MAN DISCOVERS LUNIX IS A TOY OS WITH NOT WORKING TOOLS.

Name: Anonymous 2009-10-15 11:29

ONE WORD. THE FORCED CLOSURE OF TAGS. THREAD OVER

Name: Anonymous 2009-10-15 12:50

>>7
Lunix works very well for what it was designed to do. The C64 doesn't have much primary storage space so you can't really do a lot with Lunix on it.

Name: Anonymous 2009-10-15 16:22

Name: Anonymous 2009-10-15 16:22

Name: Anonymous 2009-10-16 6:38

's/.*//g'

Name: Anonymous 2009-10-16 6:46

>>10,11
What the fuck is with this ghost sager?
Not just in this thread, in others too.
Why would anybody do something so completely pointless?

Name: TRUE TRUTH EXPERT !!TthtFzrtPXElUy7 2009-10-16 8:45

>>13
hE USED TO BE A COOL LISPNIK BUT HE DIED OF PARAENTHESES OVERDOSE (tOLD HIM THOSE SPELLS WERE DANGEROUS) ...SOME THREADS ARE HAUNTED!

Name: Anonymous 2010-12-10 15:46

Name: Anonymous 2011-02-03 5:53

Name: Anonymous 2011-02-04 11:30

Name: Anonymous 2011-02-04 13:22

Don't change these.
Name: Email:
Entire Thread Thread List