Map, Apply, Rule, ReplaceAll, MapThread, MapIndexed, Table, ...

->  /.  //. :=  =   _  __

lRules={
l1->r1,l2->r2,l3->r3,l4->r4,l5->r5
};

lRules={
{l1->r1},{l2->r2},{l3->r3},{l4->r4},{l5->r5}
};

lInvRules=
Map[{#[[1,2]]-> #[[1,1]]}&,
lRules]

a->b//FullForm

Rule[a,b][[2]]

(a->b)[[2]]

lRules={
l1->r1,l2->r2,l3->r3,l4->r4,l5->r5
};

lInvRules=
Map[#[[2]]-> #[[1]]&,
lRules]

{
{l1->r1},{l2->r2},{l3->r3},{l4->r4},{l5->r5}
}/.{x_->y_}->{y->x}

lRules={
{l1->r1},{l2->r2},{l3->r3},{l4->r4},{l5->r5}
};

lInvRules=
Map[# /.{x_->y_}->{y->x} &,
lRules]

{l1->r1,l2->r2,l3->r3,l4->r4,l5->r5}/.(x_->y_)->(y->x)

ReplaceList[
{Pi,a,b,Pi,x,Pi,x,d,Pi},
{___,Pi,x_,r___}->{{x},{r}}
]//ColumnForm

ReplaceList[
{Pi,a,b,Pi,x,Pi,x,d,Pi},
{___,Pi,x_,r___,___}->{{x},{r}}
]//ColumnForm

Times[Pi,a,b,Pi,x,Pi,x,d,Pi]

ReplaceList[
Times[Pi,a,b,Pi,x,Pi,x,d,Pi],
_* x_^p_->{x,p}
]//ColumnForm

{a,{-f,e,-d},-g,{b,-c},h}/.List->Times

a {b,-c} {-d,e,-f}-g h

a b -c -d e -f -g h

a b c d e f g h

?/.

(* answer to the question that gave me trouble: I should have used :> instead of ->  Also, Replace has a third argument (exactly like Map) that specifies the level  *)

Replace[
{a,{-f,e,-d},-g,{b,-c,5},h},
List[args___]:>Plus[args]
]

Replace[
{a,{-f,e,-d},-g,{b,-c,5},h},
List[args___]:>Plus[args],{1}
]

a+b+c^d g/.Power->List

a+b+{c,d}g

{a+b+c g,a+b+d g}

MapThread[
Apply[#3,{#1,#2}]&,
{{a,b,c,d},
{x[1],x[2],x[3],x[4]},
{f1,f2,f3,f4}}
]

{f1[a,x[1]],f2[b,x[2]],f3[c,x[3]],f4[d,x[4]]}

Map[
Apply[#[[3]],{#[[1]],#[[2]]}]&,
{{a,b,c,d},
{x[1],x[2],x[3],x[4]},
{f1,f2,f3,f4}}//Transpose
]

{{a,b,c,d},
{x[1],x[2],x[3],x[4]},
{f1,f2,f3,f4}}//Transpose

MapThread[
Apply[#3,{#1,#2}]&,
{{a,b,c,d},
{x[1],x[2],x[3],x[4]},
{f1,f2,f3,f4},
{1.0,3.7,4.0,5.0}}
]